code: def collect_variables(obj):
      """Collect Variable objects inside a given object.
  
      Args:
          obj (object): Object to collect Variable objects from.
      Returns:
          List of Variable objects.
      """
      variables = []
      if isinstance(obj, chainer.Variable):
          return [obj]
      elif isinstance(obj, chainerrl.action_value.ActionValue):
          return list(obj.params)
      elif isinstance(obj, chainerrl.distribution.Distribution):
          return list(obj.params)
      elif isinstance(obj, (list, tuple)):
          variables = []
          for child in obj:
              variables.extend(collect_variables(child))
          return variables
  
imports: import subprocess
  import chainer.computational_graph
  import chainerrl
label_desc: Use image node_id 1 for calling a global function with example usage: collect_variables(obj) and returns: list, list, list, variables