code: def main():
      assert "MLFLOW_TRACKING_URI" in os.environ
  
      # Log artifacts
      run_id1 = log_artifacts()
      # Download artifacts
      client = MlflowClient()
      print("Downloading artifacts")
      pprint(
          os.listdir(
              download_artifacts(run_id=run_id1, artifact_path="")
          )
      )
      pprint(
          os.listdir(
              download_artifacts(run_id=run_id1, artifact_path="dir")
          )
      )
  
      # List artifacts
      print("Listing artifacts")
      pprint(client.list_artifacts(run_id1))
      pprint(client.list_artifacts(run_id1, "dir"))
  
      # Log artifacts again
      run_id2 = log_artifacts()
      # Delete the run to test `mlflow gc` command
      client.delete_run(run_id2)
      print(f"Deleted run: {run_id2}")
  
file_path: mlflow/examples/mlflow_artifacts/example.py
imports: import os
  import tempfile
  from pprint import pprint
  import mlflow
  from mlflow.artifacts import download_artifacts
  from mlflow.tracking import MlflowClient
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types