code: def save(self, location=None):
          
          if location:
              location = Path(location)
              if os.path.splitext(str(location))[1] == '':
                  self._metadata_file = location / DEFAULT_FILE_NAMES['metadata']
              else:
                  self._metadata_file = location
  
          if self._metadata_file:
              with self._metadata_file.open(mode='w') as mdf:
                  json.dump(self._content, mdf, indent=4)
          else:
              logging.error("No metadata file given for storing the file")
docs: Saves the current status of the metadata
  
          This saves the metadata at the location of the previously loaded
          metadata or at the file/path given in location.
  
          Specify a location if the metadata should be stored in a different
          location or was never stored before. Subsequent saves will use the
          location set here.
  
          Parameters
          ----------
          location: str, optional
              Path or file for saving the metadata.
              This can be the full file path or just the storage folder.
              In the latter case, the filename defined in
              DEFAULT_FILE_NAMES['metadata'] (currently 'metadata.json') is
              assumed.