code: def read_metadata(
      cls,
      fs,
      paths,
      columns,
      index,
      split_stripes,
      aggregate_files,
      **kwargs,
  ):
      # Convert root directory to file list.
      # TODO: Handle hive-partitioned data
      if len(paths) == 1 and not fs.isfile(paths[0]):
          paths = fs.find(paths[0])
  
      schema = None
      parts = []
  
      def _get_schema(_o, schema):
          if schema is None:
              schema = _o.schema
          elif schema != _o.schema:
              raise ValueError(
                  "Incompatible schemas while parsing ORC files"
              )
          return schema
  
      if split_stripes:
          offset = 0
          for path in paths:
              with fs.open(path, "rb") as f:
                  o = orc.ORCFile(f)
                  if schema is None:
                      schema = o.schema
                  elif schema != o.schema:
                      raise ValueError(
                          "Incompatible schemas while parsing ORC files"
                      )
                  _stripes = list(range(o.nstripes))
                  if offset:
                      parts.append([(path, _stripes[0:offset])])
                  while offset < o.nstripes:
                      parts.append(
                          [
                              (
                                  path,
                                  _stripes[
                                      offset : offset
                                      + int(split_stripes)
                                  ],
                              )
                          ]
                      )
                      offset += int(split_stripes)
                  if aggregate_files and int(split_stripes) > 1:
                      offset -= o.nstripes
                  else:
                      offset = 0
      else:
          for path in paths:
              if schema is None:
                  with fs.open(paths[0], "rb") as f:
                      o = orc.ORCFile(f)
                      schema = o.schema
              parts.append([(path, None)])
  
      schema = _get_pyarrow_dtypes(schema, categories=None)
      if columns is not None:
          ex = set(columns) - set(schema)
          if ex:
              raise ValueError(
                  f"Requested columns ({ex}) not in schema ({set(schema)})"
              )
  
      # Check if we can aggregate adjacent parts together
      parts = cls._aggregate_files(
          aggregate_files, split_stripes, parts
      )
  
      columns = list(schema) if columns is None else columns
      index = [index] if isinstance(index, str) else index
      meta = _meta_from_dtypes(columns, schema, index, [])
      return parts, schema, meta
  
file_path: dask/dask/dataframe/io/orc/arrow.py
imports: from __future__ import annotations
  import pyarrow
  import pyarrow.orc
  from dask.dataframe.io.utils import _get_pyarrow_dtypes, _meta_from_dtypes
label_desc: Use image node_id 1 for calling the ArrowORCEngine obj's underlying member method code with example usage: obj.read_metadata(cls, fs, paths, columns, index, split_stripes, aggregate_files) and returns: parts,  schema,  meta, schema