code: def load(data, udf, data_dir, overwrite):
      
      con = make_ibis_client(ENV)
  
      # validate our environment before performing possibly expensive operations
      if not can_write_to_hdfs(con):
          raise IbisError('Failed to write to HDFS; check your settings')
      if udf and not can_build_udfs():
          raise IbisError('Build environment does not support building UDFs')
  
      # load the data files
      if data:
          load_impala_data(con, str(data_dir), overwrite)
      else:
          logger.info('Skipping Ibis test data load (--no-data)')
  
      # build and upload the UDFs
      if udf:
          already_loaded = is_udf_loaded(con)
          logger.info('Attempting to build and load test UDFs')
          if already_loaded and not overwrite:
              logger.info('UDFs already loaded and not overwriting; moving on')
          else:
              if already_loaded:
                  logger.info('UDFs already loaded; attempting to overwrite')
              logger.info('Building UDFs')
              build_udfs()
              logger.info('Uploading UDFs')
              upload_udfs(con)
      else:
          logger.info('Skipping UDF build/load (--no-udf)')
docs: Load Ibis test data and build/upload UDFs