def params_from_doc(func):
 doc = inspect.getdoc(func)
 cfg = yaml.load(doc)
 for task in cfg:
  for (module, params) in task.items():
   for (k, v) in params.items():
    if ((k in ['nics']) and (type(v) == str)):
     params[k] = [v]
  task[module] = collections.defaultdict(str, params)
 return cfg[0]['os_server']

def params_from_doc ( func ) : doc = inspect . getdoc ( func ) cfg = yaml . load ( doc ) for task in cfg : for ( module , params ) in task . items ( ) : for ( k , v ) in params . items ( ) : if ( ( k in [ 'nics' ] ) and ( type ( v ) == str ) ) : params [ k ] = [ v ] task [ module ] = collections . defaultdict ( str , params ) return cfg [ 0 ] [ 'os_server' ]
this function extracts the docstring from the specified function .