code: def score_model(path, host, port):
      """
      Score images on the local path with MLflow model deployed at given uri and port.
  
      :param path: Path to a single image file or a directory of images.
      :param host: host the model is deployed at
      :param port: Port the model is deployed at.
      :return: Server response.
      """
      if os.path.isdir(path):
          filenames = [
              os.path.join(path, x)
              for x in os.listdir(path)
              if os.path.isfile(os.path.join(path, x))
          ]
      else:
          filenames = [path]
  
      def read_image(x):
          with open(x, "rb") as f:
              return f.read()
  
      data = pd.DataFrame(
          data=[base64.encodebytes(read_image(x)) for x in filenames],
          columns=["image"],
      ).to_json(orient="split")
  
      response = requests.post(
          url=f"{host}:{port}/invocations",
          data={
              "dataframe_split": data,
          },
          headers={"Content-Type": "application/json"},
      )
  
      if response.status_code != 200:
          raise Exception(
              f"Status Code {response.status_code}. {response.text}"
          )
      return response
  
imports: import base64
  import os
  import click
  import pandas
  import requests
  from mlflow.utils import cli_args
label_desc: Use image node_id 1 for calling a global function with example usage: score_model(path, host, port) and returns: response, f