code: def save(self, save_json=True, save_xml=True):
          
          if self.layer_is_file_based:
              if save_json:
                  self.write_to_file(self.json_uri)
              if save_xml:
                  self.write_to_file(self.xml_uri)
          else:
              self.write_to_db(save_json, save_xml)
docs: Saves the metadata json and/or xml to a file or DB.
  
          :param save_json: flag to save json
          :type save_json: bool
          :param save_xml: flag to save xml
          :type save_xml: bool