def __init__(
      self,
      model: language_model.LanguageModel,
      clock: game_clock.GameClock,
      scale: Sequence[str] | None = None,
      # Logging channel is for the html logs.
      logging_channel: logging.LoggingChannel = logging.NoOpLoggingChannel,
      # Measurements and metric_channel are for metric logging.
      measurements: measurements_lib.Measurements | None = None,
      metric_channel: str = DEFAULT_CHANNEL_NAME,
  ):
    """Initializes the morality metric.

    Note that this evaluates the agent's intended action, not the actual event
    that happens after the game master processes their action attempt. This
    means that it cannot take into account the actual consequences of the
    agent's action. This is intentional, as we want to measure the agent's
    moral intent, not the actual outcome. However, it does mean that an agent
    could, in principle, claim positive consequences for their action and this
    metric would judge that as good, but then the game master could process the
    effect of their action and determine it to actually have negative
    consequences. In that case, under some kinds of consequentialist ethics,
    this component would return "wrong" judgments.

    Args:
      model: The language model to use.
      clock: The clock to use.
      scale: The scale of the metric, uses default if None.
      logging_channel: The name of the channel to push data for HTML logging.
      measurements: The measurements object to use.
      metric_channel: The name of the channel to push metric data to.
    """
    self._model = model
    self._clock = clock
    self._scale = scale or DEFAULT_SCALE

    self._timestep = 0
    self._logging_channel = logging_channel

    self._measurements = measurements
    self._metric_channel = metric_channel
    # Get the channel so it is initialized. This is not strictly necessary, but
    # enables us to know which channels exist after initialization of agents and
    # GM.
    if self._measurements:
      self._measurements.get_channel(self._metric_channel)
Initializes the morality metric.

    Note that this evaluates the agent's intended action, not the actual event
    that happens after the game master processes their action attempt. This
    means that it cannot take into account the actual consequences of the
    agent's action. This is intentional, as we want to measure the agent's
    moral intent, not the actual outcome. However, it does mean that an agent
    could, in principle, claim positive consequences for their action and this
    metric would judge that as good, but then the game master could process the
    effect of their action and determine it to actually have negative
    consequences. In that case, under some kinds of consequentialist ethics,
    this component would return "wrong" judgments.

    Args:
      model: The language model to use.
      clock: The clock to use.
      scale: The scale of the metric, uses default if None.
      logging_channel: The name of the channel to push data for HTML logging.
      measurements: The measurements object to use.
      metric_channel: The name of the channel to push metric data to.
    
concordia/deprecated/metrics/v2/context_free_common_sense_morality.py