code: def add_artifact(
              self,
              filename,
              name=None,
              metadata=None,
              content_type=None,
      ):
          
          assert self.current_run is not None, "Can only be called during a run."
          self.current_run.add_artifact(filename, name, metadata, content_type)
docs: Add a file as an artifact.
  
          In Sacred terminology an artifact is a file produced by the experiment
          run. In case of a MongoObserver that means storing the file in the
          database.
  
          This function can only be called during a run, and just calls the
          :py:meth:`sacred.run.Run.add_artifact` method.
  
          Parameters
          ----------
          filename : str
              name of the file to be stored as artifact
          name : str, optional
              optionally set the name of the artifact.
              Defaults to the relative file-path.
          metadata: dict, optional
              optionally attach metadata to the artifact.
              This only has an effect when using the MongoObserver.
          content_type: str, optional
              optionally attach a content-type to the artifact.
              This only has an effect when using the MongoObserver.