class_docstr: Stores artifacts in a remote artifact storage using HTTP requests
code: def log_artifact(self, local_file, artifact_path=None):
      verify_artifact_path(artifact_path)
  
      # Try to perform multipart upload if the file is large.
      # If the server does not support, or if the upload failed, revert to normal upload.
      if (
          MLFLOW_ENABLE_PROXY_MULTIPART_UPLOAD.get()
          and os.path.getsize(local_file)
          >= MLFLOW_MULTIPART_UPLOAD_MINIMUM_FILE_SIZE.get()
      ):
          try:
              self._try_multipart_upload(local_file, artifact_path)
              return
          except _UnsupportedMultipartUploadException:
              pass
  
      file_name = os.path.basename(local_file)
      mime_type = _guess_mime_type(file_name)
      paths = (
          (artifact_path, file_name) if artifact_path else (file_name,)
      )
      endpoint = posixpath.join("/", *paths)
      extra_headers = {"Content-Type": mime_type}
      with open(local_file, "rb") as f:
          resp = http_request(
              self._host_creds,
              endpoint,
              "PUT",
              data=f,
              extra_headers=extra_headers,
          )
          augmented_raise_for_status(resp)
  
imports: import logging
  import os
  import posixpath
  import requests
  from requests import HTTPError
  from mlflow.entities import FileInfo
  from mlflow.entities.multipart_upload import CreateMultipartUploadResponse, MultipartUploadCredential, MultipartUploadPart
  from mlflow.environment_variables import MLFLOW_ENABLE_PROXY_MULTIPART_UPLOAD, MLFLOW_MULTIPART_UPLOAD_CHUNK_SIZE, MLFLOW_MULTIPART_UPLOAD_MINIMUM_FILE_SIZE
  from mlflow.exceptions import MlflowException, _UnsupportedMultipartUploadException
  from mlflow.store.artifact.artifact_repo import ArtifactRepository, MultipartUploadMixin, verify_artifact_path
  from mlflow.store.artifact.cloud_artifact_repo import _complete_futures, _compute_num_chunks
  from mlflow.tracking._tracking_service.utils import _get_default_host_creds
  from mlflow.utils.file_utils import read_chunk, relative_path_to_artifact_path
  from mlflow.utils.mime_type_utils import _guess_mime_type
  from mlflow.utils.rest_utils import augmented_raise_for_status, http_request
  from mlflow.utils.uri import validate_path_is_safe
label_desc: Use image node_id 2 for calling the HttpArtifactRepository obj's underlying member method code with example usage: obj.log_artifact(local_file, artifact_path) without return types