class_docstr: Handles artifacts associated with a model version in the model registry via URIs of the form:
    - `models:/<model_name>/<model_version>`
    - `models:/<model_name>/<stage>`  (refers to the latest model version in the given stage)
    - `models:/<model_name>/latest` (refers to the latest of all model versions)
  It is a light wrapper that resolves the artifact path to an absolute URI then instantiates
  and uses the artifact repository for that URI.
docstr: Log a local file as an artifact, optionally taking an ``artifact_path`` to place it in
  within the run's artifacts. Run artifacts can be organized into directories, so you can
  place the artifact in a directory this way.
  
  :param local_file: Path to artifact to log
  :param artifact_path: Directory within the run's artifact directory in which to log the
                        artifact
docstr_tok: ["Log","a","local","file","as","an","artifact",",","optionally","taking","an","``","artifact_path","``","to","place","it","in","within","the","run","'s","artifacts",".","Run","artifacts","can","be","organized","into","directories",",","so","you","can","place","the","artifact","in","a","directory","this","way",".",":","param","local_file",":","Path","to","artifact","to","log",":","param","artifact_path",":","Directory","within","the","run","'s","artifact","directory","in","which","to","log","the","artifact"]
code: def log_artifact(self, local_file, artifact_path=None):
      """
      Log a local file as an artifact, optionally taking an ``artifact_path`` to place it in
      within the run's artifacts. Run artifacts can be organized into directories, so you can
      place the artifact in a directory this way.
  
      :param local_file: Path to artifact to log
      :param artifact_path: Directory within the run's artifact directory in which to log the
                            artifact
      """
      raise ValueError(
          "log_artifact is not supported for models:/ URIs. Use register_model instead."
      )
  
imports: import logging
  import os
  import urllib.parse
  import mlflow
  from mlflow.exceptions import MlflowException
  from mlflow.store.artifact.artifact_repo import ArtifactRepository
  from mlflow.store.artifact.databricks_models_artifact_repo import DatabricksModelsArtifactRepository
  from mlflow.store.artifact.unity_catalog_models_artifact_repo import UnityCatalogModelsArtifactRepository
  from mlflow.store.artifact.utils.models import get_model_name_and_version, is_using_databricks_registry
  from mlflow.utils.file_utils import write_yaml
  from mlflow.utils.uri import add_databricks_profile_info_to_artifact_uri, get_databricks_profile_uri_from_artifact_uri, is_databricks_unity_catalog_uri
label_desc: Use image node_id 6 for calling the ModelsArtifactRepository obj's underlying member method code with example usage: obj.log_artifact(local_file, artifact_path) without return types