code: def _get_hdfs_uri(path):
      host = os.environ.get("ARROW_HDFS_TEST_HOST", "localhost")
      try:
          port = int(os.environ.get("ARROW_HDFS_TEST_PORT", 0))
      except ValueError:
          raise ValueError(
              "Env variable ARROW_HDFS_TEST_PORT was not " "an integer"
          )
      uri = "hdfs://{}:{}{}".format(host, port, path)
  
      return uri
  
imports: import os
  import random
  from io import BytesIO
  from os.path import join
  import numpy
  import pytest
  import pyarrow
  from pyarrow.tests import util
  from pyarrow.tests.parquet.common import _test_dataframe
  from pyarrow.tests.parquet.test_dataset import _test_write_to_dataset_with_partitions, _test_write_to_dataset_no_partitions
  from pyarrow.util import guid
label_desc: Use image node_id 3 for calling a global function with example usage: _get_hdfs_uri(path) and returns: uri