code: def iterable_to_items(obj):
      if (
          isinstance(obj, dict)
          or isinstance(obj, OrderedDict)
          or isinstance(obj, types.MappingProxyType)
      ):
          items = obj.items()
      elif isinstance(obj, list):
          items = enumerate(obj)
      else:
          raise ValueError("The given object is not a dict or a list")
      return items
  
imports: import inspect
  import json
  import os
  import sys
  import types
  from collections import OrderedDict
  from enum import Enum
  from typing import Dict, List, Union
  from rl_coach.core_types import TrainingSteps, EnvironmentSteps, GradientClippingMethod, RunPhase, SelectedPhaseOnlyDumpFilter, MaxDumpFilter
  from rl_coach.filters.filter import NoInputFilter
  from rl_coach.logger import screen
label_desc: Use image node_id 1 for calling a global function with example usage: iterable_to_items(obj) and returns: items