code: def _get_all_input_names(
      level: LogStatsLevel, func_obj: Callable
  ) -> List[str]:
      """
      Obtain all valid input names for a specific event method.
  
      :param level The level is required to include the output names of the predecessor statistics.
      :param func_obj The event method
      """
      signature = inspect.signature(func_obj)
      event_attributes = [
          p.name for p in list(signature.parameters.values())[1:]
      ]
  
      if level is LogStatsLevel.STEP:
          return event_attributes
  
      if level is LogStatsLevel.EPISODE:
          previous_dict = getattr(
              func_obj, LogStatsLevel.STEP.name, None
          )
      elif level is LogStatsLevel.EPOCH:
          previous_dict = getattr(
              func_obj, LogStatsLevel.EPISODE.name, None
          )
      else:
          raise ValueError("invalid level {}".format(level))
  
      if not previous_dict:
          return event_attributes
  
      return [
          output_name
          for agg_list in previous_dict.values()
          for agg_fn, output_name, group_by, cumulative in agg_list
      ]
  
file_path: maze/maze/core/log_stats/event_decorators.py
imports: import inspect
  from collections import defaultdict
  from typing import Callable, Optional, List, Dict
  from maze.core.log_stats.log_stats import LogStatsLevel
label_desc: Use image node_id 1 for calling a global function with example usage: _get_all_input_names(level, func_obj) and returns: unknown, event_attributes, event_attributes