code: def _check_input_name(
      level: LogStatsLevel, func_obj: Callable, input_name: str
  ) -> None:
      if input_name is None:
          return
  
      # get all available input names from the previous aggregation level
      input_names = _get_all_input_names(level, func_obj)
  
      # check if the input name is existing
      if input_name not in input_names:
          raise ValueError(
              "unknown input {}, expected on of {}".format(
                  input_name, input_names
              )
          )
  
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 2 for calling a global function with example usage: _check_input_name(level, func_obj, input_name) without return types