code: def to_orc(
      df,
      fname,
      compression="snappy",
      statistics="ROWGROUP",
      stripe_size_bytes=None,
      stripe_size_rows=None,
      row_index_stride=None,
      cols_as_map_type=None,
      storage_options=None,
      index=None,
  ):
      """{docstring}"""
  
      for col in df._data.columns:
          if isinstance(col, cudf.core.column.CategoricalColumn):
              raise NotImplementedError(
                  "Writing to ORC format is not yet supported with "
                  "Categorical columns."
              )
  
      if isinstance(df.index, cudf.CategoricalIndex):
          raise NotImplementedError(
              "Writing to ORC format is not yet supported with "
              "Categorical columns."
          )
  
      if cols_as_map_type is not None and not isinstance(
          cols_as_map_type, list
      ):
          raise TypeError(
              "cols_as_map_type must be a list of column names."
          )
  
      path_or_buf = ioutils.get_writer_filepath_or_buffer(
          path_or_data=fname, mode="wb", storage_options=storage_options
      )
      if ioutils.is_fsspec_open_file(path_or_buf):
          with path_or_buf as file_obj:
              file_obj = ioutils.get_IOBase_writer(file_obj)
              liborc.write_orc(
                  df,
                  file_obj,
                  compression,
                  statistics,
                  stripe_size_bytes,
                  stripe_size_rows,
                  row_index_stride,
                  cols_as_map_type,
                  index,
              )
      else:
          liborc.write_orc(
              df,
              path_or_buf,
              compression,
              statistics,
              stripe_size_bytes,
              stripe_size_rows,
              row_index_stride,
              cols_as_map_type,
              index,
          )
  
file_path: cudf/python/cudf/cudf/io/orc.py
imports: import datetime
  import warnings
  import pyarrow
  from fsspec.utils import stringify_path
  import cudf
  from cudf._lib import orc
  from cudf.api.types import is_list_like
  from cudf.utils import ioutils
  from cudf.utils.metadata import orc_column_statistics_pb2
label_desc: Use image node_id 7 for calling a global function with example usage: to_orc(df, fname, compression, statistics, stripe_size_bytes, stripe_size_rows, row_index_stride, cols_as_map_type, storage_options, index) without return types