def __init__(
      self,
      function: Callable[[], str],
      *,
      pre_act_label: str = DEFAULT_PRE_ACT_LABEL,
  ):
    """Initializes the component.

    Args:
      function: the function that returns a string to report as state of the
        component.
      pre_act_label: Prefix to add to the output of the component when called
        in `pre_act`.
    """
    super().__init__(pre_act_label)
    self._function = function
Initializes the component.

    Args:
      function: the function that returns a string to report as state of the
        component.
      pre_act_label: Prefix to add to the output of the component when called
        in `pre_act`.
    
concordia/components/agent/report_function.py