code: def donew(cls, *args, **kwargs):
      clsmod = sys.modules[cls.__module__]
      # import specified packages
      for p in cls.packages:
          if isinstance(p, (tuple, list)):
              p, palias = p
          else:
              palias = p
  
          pmod = __import__(p)
  
          plevels = p.split(".")
          if p == palias and len(plevels) > 1:  # 'os.path' not aliased
              setattr(clsmod, pmod.__name__, pmod)  # set 'os' in module
  
          else:  # aliased and/or dots
              for plevel in plevels[1:]:  # recurse down the mod
                  pmod = getattr(pmod, plevel)
  
              setattr(clsmod, palias, pmod)
  
      # import from specified packages - the 2nd part is a string or iterable
      for p, frompackage in cls.frompackages:
          if isinstance(frompackage, string_types):
              frompackage = (frompackage,)  # make it a tuple
  
          for fp in frompackage:
              if isinstance(fp, (tuple, list)):
                  fp, falias = fp
              else:
                  fp, falias = fp, fp  # assumed is string
  
              # complain "not string" without fp (unicode vs bytes)
              pmod = __import__(p, fromlist=[str(fp)])
              pattr = getattr(pmod, fp)
              setattr(clsmod, falias, pattr)
              for basecls in cls.__bases__:
                  setattr(
                      sys.modules[basecls.__module__], falias, pattr
                  )
  
      # Create params and set the values from the kwargs
      params = cls.params()
      for pname, pdef in cls.params._getitems():
          setattr(params, pname, kwargs.pop(pname, pdef))
  
      # Create the object and set the params in place
      _obj, args, kwargs = super(MetaParams, cls).donew(*args, **kwargs)
      _obj.params = params
      _obj.p = params  # shorter alias
  
      # Parameter values have now been set before __init__
      return _obj, args, kwargs
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from collections import OrderedDict
  import itertools
  import sys
  import backtrader
  from .utils.py3 import zip, string_types, with_metaclass
label_desc: Use image node_id 2 for calling the MetaParams obj's underlying member method code with example usage: obj.donew(cls) and returns: _obj,  args,  kwargs