code: def to_orc(
      df,
      path,
      write_index=True,
      storage_options=None,
      compression="snappy",
      compute=True,
      **kwargs,
  ):
      """
      Write a :class:`.DataFrame` to ORC file(s) (one file per partition).
  
      Parameters
      ----------
      df : DataFrame
      path : str or pathlib.Path
          Destination directory for data.  Prepend with protocol like ``s3://``
          or ``hdfs://`` for remote data.
      write_index : boolean, optional
          Whether or not to write the index. Defaults to True.
      storage_options : None or dict
          Further parameters to pass to the bytes backend.
      compression : string or dict, optional
      compute : bool, optional
          If True (default) then the result is computed immediately. If
          False then a :class:`~dask.delayed.Delayed` object is returned
          for future computation.
  
      """
  
      from dask import compute as dask_compute, delayed
  
      # TODO: Use upstream dask implementation once available
      #       (see: Dask Issue#5596)
  
      if hasattr(path, "name"):
          path = stringify_path(path)
      fs, _, _ = get_fs_token_paths(
          path, mode="wb", storage_options=storage_options
      )
      # Trim any protocol information from the path before forwarding
      path = fs._strip_protocol(path)
  
      if write_index:
          df = df.reset_index()
      else:
          # Not writing index - might as well drop it
          df = df.reset_index(drop=True)
  
      fs.mkdirs(path, exist_ok=True)
  
      # Use i_offset and df.npartitions to define file-name list
      filenames = ["part.%i.orc" % i for i in range(df.npartitions)]
  
      # write parts
      dwrite = delayed(write_orc_partition)
      parts = [
          dwrite(d, path, fs, filename, compression=compression)
          for d, filename in zip(df.to_delayed(), filenames)
      ]
  
      if compute:
          return dask_compute(*parts)
  
      return delayed(list)(parts)
  
file_path: cudf/python/dask_cudf/dask_cudf/io/orc.py
imports: from io import BufferedWriter, IOBase
  from fsspec.core import get_fs_token_paths
  from fsspec.utils import stringify_path
  from pyarrow import orc
  from dask import dataframe
  from dask.base import tokenize
  from dask.dataframe.io.utils import _get_pyarrow_dtypes
  import cudf
label_desc: Use image node_id 4 for calling a global function with example usage: to_orc(df, path, write_index, storage_options, compression, compute) and returns: delayed, dask_compute