parameters: (kwds)
return_statement: return obj
docstring: Code generator function, parse user arguments, load and
      return appropriate template generator module.
docstring_summary: Code generator function, parse user arguments, load and
      return appropriate template generator module.
docstring_tokens: Code generator function parse user arguments load and return appropriate template generator module .
function: def code_generator(kwds):
      """
      Code generator function, parse user arguments, load and
      return appropriate template generator module.
      """
      debug = kwds.get('debug', None)
      if  debug:
          print("Configuration:")
          pprint.pprint(kwds)
      try:
          klass  = kwds.get('tmpl')
          mname  = 'FWCore.Skeletons.%s' % klass.lower()
          module = __import__(mname, fromlist=[klass])
      except ImportError as err:
          klass  = 'AbstractPkg'
          module = __import__('FWCore.Skeletons.pkg', fromlist=[klass])
          if  debug:
              print("%s, will use %s" % (str(err), klass))
      obj = getattr(module, klass)(kwds)
      return obj
function_tokens: def code_generator ( kwds ) : debug = kwds . get ( 'debug' , None ) if debug : print ( "Configuration:" ) pprint . pprint ( kwds ) try : klass = kwds . get ( 'tmpl' ) mname = 'FWCore.Skeletons.%s' % klass . lower ( ) module = __import__ ( mname , fromlist = [ klass ] ) except ImportError as err : klass = 'AbstractPkg' module = __import__ ( 'FWCore.Skeletons.pkg' , fromlist = [ klass ] ) if debug : print ( "%s, will use %s" % ( str ( err ) , klass ) ) obj = getattr ( module , klass ) ( kwds ) return obj