class_docstr: This is a replacement for Python's list that provides a vars() method to return all the variables that it
  contains, including the ones contained in the modules and sub-modules in it.
class_docstr_tok: ["This","is","a","replacement","for","Python","'s","list","that","provides","a","vars","(",")","method","to","return","all","the","variables","that","it","contains",",","including","the","ones","contained","in","the","modules","and","sub-modules","in","it","."]
docstr: Collect all the variables (and their names) contained in the list and its submodules.
  
  Args:
      scope: string to prefix to the variable names.
  Returns:
      A VarCollection of all the variables.
docstr_tok: ["Collect","all","the","variables","(","and","their","names",")","contained","in","the","list","and","its","submodules",".","Args",":","scope",":","string","to","prefix","to","the","variable","names",".","Returns",":","A","VarCollection","of","all","the","variables","."]
code: def vars(self, scope: str = "") -> VarCollection:
      """Collect all the variables (and their names) contained in the list and its submodules.
  
      Args:
          scope: string to prefix to the variable names.
      Returns:
          A VarCollection of all the variables.
      """
      vc = VarCollection()
      scope += f"({self.__class__.__name__})"
      for p, v in enumerate(self):
          if isinstance(v, BaseVar):
              vc[f"{scope}[{p}]"] = v
          elif isinstance(v, Module):
              vc.update(v.vars(scope=f"{scope}[{p}]"))
      return vc
  
imports: from collections import namedtuple
  from typing import Optional, List, Union, Callable, Tuple
  import jax
  import jax.numpy
  import numpy
  from objax.typing import JaxArray
  from objax.util import class_name, override_args_kwargs, positional_args_names, repr_function
  from objax.variable import BaseVar, RandomState, VarCollection
label_desc: Use image node_id 1 for calling the ModuleList obj's underlying member method code with example usage: obj.vars(scope) and returns: vc