code: def _emulate(func, *args, **kwargs):
      """
      Apply a function using args / kwargs. If arguments contain dd.DataFrame /
      dd.Series, using internal cache (``_meta``) for calculation
      """
      with raise_on_meta_error(funcname(func)):
          return func(*_extract_meta(args), **_extract_meta(kwargs))
  
imports: import math
  import textwrap
  import warnings
  import numpy
  import pandas
  from tlz import partition_all
  from dask import dataframe
  from dask.base import normalize_token, tokenize
  from dask.dataframe.core import Scalar, handle_out, make_meta, map_partitions
  from dask.dataframe.utils import raise_on_meta_error
  from dask.highlevelgraph import HighLevelGraph
  from dask.utils import M, OperatorMethodMixin, apply, derived_from, funcname
  import cudf
  from cudf import _lib
  from cudf.utils.nvtx_annotation import _dask_cudf_nvtx_annotate
  from dask_cudf import sorting
  from dask_cudf.accessors import ListMethods, StructMethods
  from dask_cudf.sorting import _deprecate_shuffle_kwarg, _get_shuffle_method
label_desc: Use image node_id 8 for calling a global function with example usage: _emulate(func) and returns: func