parameters: (sig: Sequence[Union[str, Dict[str, Any]]])
return_statement: return newsig
docstring: parse a single descriptor (array of strings or dicts) into a
      dict of function descriptor/validators (objects of CephXXX type)
  
      :returns: list of ``argdesc``
docstring_summary: parse a single descriptor (array of strings or dicts) into a
      dict of function descriptor/validators (objects of CephXXX type)
docstring_tokens: parse a single descriptor ( array of strings or dicts ) into a dict of function descriptor / validators ( objects of CephXXX type )
function: def parse_funcsig(sig: Sequence[Union[str, Dict[str, Any]]]) -> List[argdesc]:
      """
      parse a single descriptor (array of strings or dicts) into a
      dict of function descriptor/validators (objects of CephXXX type)
  
      :returns: list of ``argdesc``
      """
      newsig = []
      argnum = 0
      for desc in sig:
          argnum += 1
          if isinstance(desc, basestring):
              t = CephPrefix
              desc = {'type': t, 'name': 'prefix', 'prefix': desc}
          else:
              # not a simple string, must be dict
              if 'type' not in desc:
                  s = 'JSON descriptor {0} has no type'.format(sig)
                  raise JsonFormat(s)
              # look up type string in our globals() dict; if it's an
              # object of type `type`, it must be a
              # locally-defined class. otherwise, we haven't a clue.
              if desc['type'] in globals():
                  t = globals()[desc['type']]
                  if not isinstance(t, type):
                      s = 'unknown type {0}'.format(desc['type'])
                      raise JsonFormat(s)
              else:
                  s = 'unknown type {0}'.format(desc['type'])
                  raise JsonFormat(s)
  
          kwargs = dict()
          for key, val in desc.items():
              if key not in ['type', 'name', 'n', 'req', 'positional']:
                  kwargs[key] = val
          newsig.append(argdesc(t,
                                name=desc.get('name', None),
                                n=desc.get('n', 1),
                                req=desc.get('req', True),
                                positional=desc.get('positional', True),
                                **kwargs))
      return newsig
function_tokens: def parse_funcsig ( sig : Sequence [ Union [ str , Dict [ str , Any ] ] ] ) -> List [ argdesc ] : newsig = [ ] argnum = 0 for desc in sig : argnum += 1 if isinstance ( desc , basestring ) : t = CephPrefix desc = { 'type' : t , 'name' : 'prefix' , 'prefix' : desc } else : # not a simple string, must be dict if 'type' not in desc : s = 'JSON descriptor {0} has no type' . format ( sig ) raise JsonFormat ( s ) # look up type string in our globals() dict; if it's an # object of type `type`, it must be a # locally-defined class. otherwise, we haven't a clue. if desc [ 'type' ] in globals ( ) : t = globals ( ) [ desc [ 'type' ] ] if not isinstance ( t , type ) : s = 'unknown type {0}' . format ( desc [ 'type' ] ) raise JsonFormat ( s ) else : s = 'unknown type {0}' . format ( desc [ 'type' ] ) raise JsonFormat ( s ) kwargs = dict ( ) for key , val in desc . items ( ) : if key not in [ 'type' , 'name' , 'n' , 'req' , 'positional' ] : kwargs [ key ] = val newsig . append ( argdesc ( t , name = desc . get ( 'name' , None ) , n = desc . get ( 'n' , 1 ) , req = desc . get ( 'req' , True ) , positional = desc . get ( 'positional' , True ) , * * kwargs ) ) return newsig