def processmetadata(metadata, items=None, comments=None, delimiter_regex=None,<EOL>ncols=None, verbosity=DEFAULT_VERBOSITY):
items = items.split('<STR_LIT:U+002C>') if isinstance(items,str) else items<EOL>if comments is None:<EOL><INDENT>if '<STR_LIT>' in list(metadata.keys()):<EOL><INDENT>comments = metadata['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>comments = '<STR_LIT:#>'<EOL>if verbosity > <NUM_LIT:8>:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if (('<STR_LIT>' in list(metadata.keys())) and <EOL>(comments != metadata['<STR_LIT>']) and (verbosity > <NUM_LIT:8>)):<EOL><INDENT>print('<STR_LIT>', repr(comments) ,'<STR_LIT>', repr(metadata['<STR_LIT>']) , '<STR_LIT>')<EOL><DEDENT><DEDENT>if not items:<EOL><INDENT>for k in list(metadata.keys()):<EOL><INDENT>if is_string_like(metadata[k]):<EOL><INDENT>metadata[k] = '<STR_LIT:\n>'.join([x.lstrip(comments) <EOL>for x in metadata[k].split('<STR_LIT:\n>') ])<EOL><DEDENT><DEDENT><DEDENT>if not items or '<STR_LIT>' in items:<EOL><INDENT>if '<STR_LIT>' in list(metadata.keys()):<EOL><INDENT>if isinstance(metadata['<STR_LIT>'],str):<EOL><INDENT>D = dialectfromstring(metadata['<STR_LIT>'].lstrip(comments))<EOL>if D:<EOL><INDENT>metadata['<STR_LIT>'] = D<EOL>if (verbosity > <NUM_LIT:8>):<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if (verbosity > <NUM_LIT:8>):<EOL><INDENT>print('''<STR_LIT>''')<EOL><DEDENT><DEDENT><DEDENT>if '<STR_LIT>' in dir(metadata['<STR_LIT>']):<EOL><INDENT>for a in dir(metadata['<STR_LIT>']):<EOL><INDENT>if not a.startswith('<STR_LIT:_>') and a in list(metadata.keys()):<EOL><INDENT>setattr(metadata['<STR_LIT>'],a, metadata[a])<EOL>if ((verbosity > <NUM_LIT:2> and a == '<STR_LIT>') or <EOL>(verbosity >= <NUM_LIT:8>)):<EOL><INDENT>print('<STR_LIT>', a, '<STR_LIT>', repr(metadata[a]))<EOL><DEDENT><DEDENT>elif not a.startswith('<STR_LIT:_>') and a not in list(metadata.keys()):<EOL><INDENT>metadata[a] = getattr(metadata['<STR_LIT>'], a)<EOL>if ((verbosity > <NUM_LIT:2> and a == '<STR_LIT>') or (verbosity >= <NUM_LIT:8>)):<EOL><INDENT>print('<STR_LIT>', a , '<STR_LIT>', repr(metadata[a]))<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>if (not items or '<STR_LIT>' in items) and ('<STR_LIT>' in list(metadata.keys())): <EOL><INDENT>if is_string_like(metadata['<STR_LIT>']):<EOL><INDENT>if delimiter_regex:<EOL><INDENT>metadata['<STR_LIT>'] = delimiter_regex.split(metadata['<STR_LIT>'])<EOL><DEDENT>elif (('<STR_LIT>' in list(metadata.keys())) and <EOL>('<STR_LIT>' in dir(metadata['<STR_LIT>']))):<EOL><INDENT>d = metadata['<STR_LIT>']<EOL>n = metadata['<STR_LIT>']<EOL>metadata['<STR_LIT>'] = list(csv.reader([n.lstrip(comments)],      <EOL>dialect=d))[<NUM_LIT:0>]<EOL>if (verbosity > <NUM_LIT:8>):<EOL><INDENT>print('<STR_LIT>', repr(d.delimiter), '<STR_LIT>', metadata['<STR_LIT>'])<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if (not items or '<STR_LIT>' in items) and '<STR_LIT>' in list(metadata.keys()): <EOL><INDENT>if is_string_like(metadata['<STR_LIT>']):   <EOL><INDENT>if delimiter_regex:<EOL><INDENT>metadata['<STR_LIT>'] = delimiter_regex.split(metadata['<STR_LIT>']) <EOL><DEDENT>elif (('<STR_LIT>' in list(metadata.keys())) and ('<STR_LIT>' in dir(metadata['<STR_LIT>']))):<EOL><INDENT>d = metadata['<STR_LIT>']<EOL>n = metadata['<STR_LIT>']<EOL>metadata['<STR_LIT>'] = list(csv.reader([n.lstrip(comments)],  <EOL>dialect=d))[<NUM_LIT:0>]<EOL>if (verbosity > <NUM_LIT:8>):<EOL><INDENT>print('<STR_LIT>', repr(d.delimiter), '<STR_LIT>', metadata['<STR_LIT>'])       <EOL><DEDENT><DEDENT><DEDENT>if ncols:<EOL><INDENT>metadata['<STR_LIT>'] = postprocessformats(metadata['<STR_LIT>'],ncols)<EOL><DEDENT><DEDENT>if (not items or '<STR_LIT>' in items) and '<STR_LIT>' in list(metadata.keys()): <EOL><INDENT>if is_string_like(metadata['<STR_LIT>']):      <EOL><INDENT>if delimiter_regex:<EOL><INDENT>metadata['<STR_LIT>'] = delimiter_regex.split(metadata['<STR_LIT>']) <EOL><DEDENT>elif (('<STR_LIT>' in list(metadata.keys())) and <EOL>('<STR_LIT>' in dir(metadata['<STR_LIT>']))):<EOL><INDENT>d = metadata['<STR_LIT>']<EOL>n = metadata['<STR_LIT>']<EOL>metadata['<STR_LIT>'] = list(csv.reader([n.lstrip(comments)],  <EOL>dialect=d))[<NUM_LIT:0>]<EOL>if (verbosity > <NUM_LIT:8>):<EOL><INDENT>print('<STR_LIT>', repr(d.delimiter), '<STR_LIT>', metadata['<STR_LIT>'])      <EOL><DEDENT><DEDENT><DEDENT>if ncols:<EOL><INDENT>metadata['<STR_LIT>'] = postprocessformats(metadata['<STR_LIT>'],ncols)<EOL><DEDENT><DEDENT>if (not items or '<STR_LIT>' in items) and ('<STR_LIT>' in list(metadata.keys())):<EOL><INDENT>if is_string_like(metadata['<STR_LIT>']):<EOL><INDENT>C = coloringfromstring(metadata['<STR_LIT>'].lstrip(comments))<EOL>if C:<EOL><INDENT>metadata['<STR_LIT>'] = C<EOL>if (verbosity > <NUM_LIT:8>):  <EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if verbosity > <NUM_LIT:1>:<EOL><INDENT>print('<STR_LIT>')<EOL>metadata['<STR_LIT>'] = metadata['<STR_LIT>']<EOL>metadata.pop('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if (not items or '<STR_LIT>' in items):<EOL><INDENT>if '<STR_LIT>' in list(metadata.keys()):<EOL><INDENT>if isinstance(metadata['<STR_LIT>'], str):<EOL><INDENT>try:<EOL><INDENT>h = metadata['<STR_LIT>']<EOL>metadata['<STR_LIT>'] = int(h.lstrip(comments))<EOL><DEDENT>except (ValueError,TypeError):<EOL><INDENT>if verbosity > <NUM_LIT:6>:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>if isinstance(metadata['<STR_LIT>'], int):<EOL><INDENT>if '<STR_LIT>' in list(metadata.keys()):<EOL><INDENT>h= metadata['<STR_LIT>']<EOL>mmd = metadata['<STR_LIT>']<EOL>metadata['<STR_LIT>'] = max(h, <NUM_LIT:1> + max([v <EOL>if isinstance(v, int) else max(v) <EOL>for v in list(mmd.values())]))<EOL>if ((metadata['<STR_LIT>'] > h) and (verbosity > <NUM_LIT:8>)):<EOL><INDENT>print('<STR_LIT>', h, '<STR_LIT:to>', metadata['<STR_LIT>'], '<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>
Process Metadata from stored (or "packed") state to functional state.

 Metadata can come be read from a file "packed" in various ways, 
 e.g. with a string representation of a dialect or coloring dictionary.  
 This function "unpacks" the stored metadata into useable Python
 objects.  It consists of a list of quasi-modular parts, one for each 
 type of recognized metadata.

 **Parameters**

     **metadata** : dictionary

         This argument is a dictionary whose keys are strings denoting
         different kinds of metadata (e.g. "names" or "formats") and whose 
         values are the metadata of that type.  The metadata dictionary is 
         modified IN-PLACE by this function.

     **items** : string or list of strings, optional

         The items arguments specifies which metadata keys are to be 
         processed.  E.g. of items = 'names,formats', then the "names" 
         metadata and "formats" metadata will be processed, but no others.
         Note however, that sometimes, the processing of one type of metadata 
         requires that another be processed first, e.g. "dialect" must 
         processed into an actual CSV.dialect object before "names"  is 
         processed.  (The processed of "names" metadata involves splitting 
         the names metadata string into a list, using the delimiter.  This 
         delimiter is part of the dialect object.)   In these cases, if you 
         call processmetadata on one item before its requirements are 
         processed, nothing will happen.

     **comments** : single-character string, optional

         The comments character is used to process many pieces of metadata, 
         e.g. it is striped of the left side of names and formats strings
         before splitting on delimiter.

     **verbosity** : integer, optional

         Determines the level of verbosity in the printout of messages
         during the running of the procedure. 

**Returns**

    Nothing.