code: def encode_base64(data: Union[str, bytes]) -> str:
      if isinstance(data, str):
          data = data.encode("utf-8")
      encoded = base64.b64encode(data)
      return encoded.decode("utf-8")
  
imports: import base64
  import datetime
  import os
  import posixpath
  import re
  import urllib.parse
  from typing import Union
  from mlflow.entities import FileInfo
  from mlflow.entities.multipart_upload import CreateMultipartUploadResponse, MultipartUploadCredential
  from mlflow.environment_variables import MLFLOW_ARTIFACT_UPLOAD_DOWNLOAD_TIMEOUT
  from mlflow.exceptions import MlflowException
  from mlflow.store.artifact.artifact_repo import ArtifactRepository, MultipartUploadMixin
  from mlflow.tracking._tracking_service.utils import _get_default_host_creds
label_desc: Use image node_id 1 for calling a global function with example usage: encode_base64(data) and returns: encoded