code: def get_pip_requirements(
      run_id, artifact_path, return_constraints=False
  ):
      req_path = download_artifacts(
          run_id=run_id,
          artifact_path=f"{artifact_path}/requirements.txt",
      )
      reqs = read_lines(req_path)
  
      if return_constraints:
          con_path = download_artifacts(
              run_id=run_id,
              artifact_path=f"{artifact_path}/constraints.txt",
          )
          cons = read_lines(con_path)
          return set(reqs), set(cons)
  
      return set(reqs)
  
file_path: mlflow/examples/pip_requirements/pip_requirements.py
imports: import tempfile
  import sklearn
  import xgboost
  from sklearn.datasets import load_iris
  import mlflow
  from mlflow.artifacts import download_artifacts
  from mlflow.models.signature import infer_signature
label_desc: Use image node_id 2 for calling a global function with example usage: get_pip_requirements(run_id, artifact_path, return_constraints) and returns: set, set,  set