parameters: (self, data, replace=False)
docstring: takes a whole dictionary of values and sets them
docstring_summary: takes a whole dictionary of values and sets them
docstring_tokens: takes a whole dictionary of values and sets them
function: def add_metadata(self, data, replace=False):
          '''takes a whole dictionary of values and sets them'''
          metadata_mode = "json"
  
          if metadata_mode == 'json':
              if replace:
                  self.metadata = data
                  self.set_json_value("metadata", data)
              else:
                  for name, value in data.items():
                      self.set_metadata_value(name, value)
  
          else:
              if replace:
                  self.set_value("metadata", "<metadata/>")
                  self.metadata = None
  
              for name, value in data.items():
                  self.set_metadata_value(name, value)
function_tokens: def add_metadata ( self , data , replace = False ) : metadata_mode = "json" if metadata_mode == 'json' : if replace : self . metadata = data self . set_json_value ( "metadata" , data ) else : for name , value in data . items ( ) : self . set_metadata_value ( name , value ) else : if replace : self . set_value ( "metadata" , "<metadata/>" ) self . metadata = None for name , value in data . items ( ) : self . set_metadata_value ( name , value )