class_docstr: Performs storage operations on artifacts in the access-controlled
  `dbfs:/databricks/mlflow-tracking` location.
  
  Signed access URIs for S3 / Azure Blob Storage are fetched from the MLflow service and used to
  read and write files from/to this location.
  
  The artifact_uri is expected to be of the form
  dbfs:/databricks/mlflow-tracking/<EXP_ID>/<RUN_ID>/
class_docstr_tok: ["Performs","storage","operations","on","artifacts","in","the","access-controlled","`","dbfs",":","\/databricks\/mlflow-tracking","`","location",".","Signed","access","URIs","for","S3","\/","Azure","Blob","Storage","are","fetched","from","the","MLflow","service","and","used","to","read","and","write","files","from\/to","this","location",".","The","artifact_uri","is","expected","to","be","of","the","form","dbfs",":","\/databricks\/mlflow-tracking\/","<","EXP_ID",">","\/","<","RUN_ID",">","\/"]
code: def _signed_url_upload_file(self, credentials, local_file):
      try:
          headers = self._extract_headers_from_credentials(
              credentials.headers
          )
          signed_write_uri = credentials.signed_uri
          # Putting an empty file in a request by reading file bytes gives 501 error.
          if os.stat(local_file).st_size == 0:
              with cloud_storage_http_request(
                  "put", signed_write_uri, data="", headers=headers
              ) as response:
                  augmented_raise_for_status(response)
          else:
              with open(local_file, "rb") as file:
                  with cloud_storage_http_request(
                      "put",
                      signed_write_uri,
                      data=file,
                      headers=headers,
                  ) as response:
                      augmented_raise_for_status(response)
      except Exception as err:
          raise MlflowException(err)
  
imports: import base64
  import logging
  import os
  import posixpath
  import uuid
  import requests
  import mlflow.tracking
  from mlflow.azure.client import patch_adls_file_upload, patch_adls_flush, put_adls_file_creation, put_block, put_block_list
  from mlflow.entities import FileInfo
  from mlflow.environment_variables import MLFLOW_MULTIPART_DOWNLOAD_CHUNK_SIZE, MLFLOW_MULTIPART_UPLOAD_CHUNK_SIZE
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_artifacts_pb2 import ArtifactCredentialType, CompleteMultipartUpload, CreateMultipartUpload, DatabricksMlflowArtifactsService, GetCredentialsForRead, GetCredentialsForWrite, GetPresignedUploadPartUrl, PartEtag
  from mlflow.protos.databricks_pb2 import INTERNAL_ERROR, INVALID_PARAMETER_VALUE
  from mlflow.protos.service_pb2 import GetRun, ListArtifacts, MlflowService
  from mlflow.store.artifact.cloud_artifact_repo import CloudArtifactRepository, _complete_futures, _compute_num_chunks
  from mlflow.utils import chunk_list
  from mlflow.utils.databricks_utils import get_databricks_host_creds
  from mlflow.utils.file_utils import download_file_using_http_uri, read_chunk
  from mlflow.utils.proto_json_utils import message_to_json
  from mlflow.utils.request_utils import cloud_storage_http_request
  from mlflow.utils.rest_utils import _REST_API_PATH_PREFIX, augmented_raise_for_status, call_endpoint, extract_api_info_for_service
  from mlflow.utils.uri import extract_and_normalize_path, get_databricks_profile_uri_from_artifact_uri, is_databricks_acled_artifacts_uri, is_valid_dbfs_uri, remove_databricks_profile_info_from_artifact_uri
label_desc: Use image node_id 13 for calling the DatabricksArtifactRepository obj's underlying member method code with example usage: obj._signed_url_upload_file(credentials, local_file) without return types