code: def check_if_committed(self, filename: str) -> bool:
          
          if os.path.isfile(filename + '.json.xz'):
              filename += '.json.xz'
          elif os.path.isfile(filename + '.json'):
              filename += '.json'
          else:
              return False
          try:
              load_structure_from_file(self.context, filename)
              return True
          except (FileNotFoundError, lzma.LZMAError, json.decoder.JSONDecodeError):
              return False
docs: Checks to see if the current post has been committed.
  
          A post is considered committed if its json metadata file exists and is not malformed.
  
          .. versionadded:: 4.2