class_docstr: A `Dataset` that groups its input and performs a windowed reduction.
docstr: Make wrapping defun for key_func.
docstr_tok: ["Make","wrapping","defun","for","key_func","."]
code: def _make_key_func(self, key_func, input_dataset):
      """Make wrapping defun for key_func."""
  
      def key_func_wrapper(*args):
          return ops.convert_to_tensor(
              key_func(*args), dtype=dtypes.int64
          )
  
      self._key_func = structured_function.StructuredFunctionWrapper(
          key_func_wrapper,
          self._transformation_name(),
          dataset=input_dataset,
      )
      if not self._key_func.output_structure.is_compatible_with(
          tensor_spec.TensorSpec([], dtypes.int64)
      ):
          raise ValueError(
              f"Invalid `key_func`. `key_func` must return a single "
              f"`tf.int64` scalar tensor but its return type is "
              f"{self._key_func.output_structure}."
          )
  
file_path: tensorflow-upstream/tensorflow/python/data/ops/group_by_window_op.py
imports: from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import structured_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.ops import gen_experimental_dataset_ops
label_desc: Use image node_id 3 for calling the _GroupByWindowDataset obj's underlying member method code with example usage: obj._make_key_func(key_func, input_dataset) and returns: ops