# `Monty.SensorModules.SensorModule.TransformContext`
[🔗](https://github.com/d-led/ex.tbp.monty/blob/v0.1.0/packages/ex_tbp_monty_core/lib/monty/sensor_modules/sensor_module/transform_context.ex#L1)

What a transform knows about the step it is transforming.

Mirrors `tbp/monty/sensor_modules/sensor_module.py::TransformContext`: the
random stream, where the agent and this sensor are, and the two flags that
decide whether the step is one to learn from and whether a failure inside a
transform should be raised or reported.

Monty passes its one runtime `rng` here. The port passes the stream this
sensor may draw from at this step (`Monty.Context.rng_for/2`), so a transform
that samples is reproducible from the episode seed alone
(`docs/monty-differences.md` §2.1).

# `rng`

```elixir
@type rng() :: :rand.state()
```

# `t`

```elixir
@type t() :: %Monty.SensorModules.SensorModule.TransformContext{
  agent_state: Monty.Frameworks.Models.MotorSystemState.AgentState.t() | nil,
  motor_only_step: boolean(),
  rng: rng() | nil,
  sensor_state: Monty.Frameworks.Models.MotorSystemState.SensorState.t() | nil,
  suppress_runtime_errors: boolean()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
