What does the RayPerceptionSensore3D compocent observe?

Hello
I’m just learning about ML-agent.

Does the “RayPerceptionSensor3D” component observe only tags and positions that have been hit by rays?
Then, is it the same as adding the code below in the “CollectObservation” function?

for(int i = 0; i < numOfRays; i++) {
    rayHits[i] = Physics.SphereCast(each direction...);
}

foreach(RayCastHit rayHit in rayHits) {
    sensor.AddObservation(rayHit.collider.tag);
    sensor.AddObservation(rayHit.collider.transform.position);
}

That’s the general idea though there are independent observations for each tag type. It is all open source if you want to look at the details:
ml-agents/RayPerceptionSensor.cs at main · Unity-Technologies/ml-agents (github.com)