code: def _eval_split_partition_fn(
      example, num_partitions, eval_fraction, all_ids
  ):
      """Partition function to split into train/eval based on the hash ids."""
      del num_partitions
      example_id = example[0]
      eval_range = int(len(all_ids) * eval_fraction)
      for i in range(eval_range):
          if all_ids[i] == example_id:
              return 0
      return 1
  
file_path: ddsp/ddsp/training/data_preparation/prepare_tfrecord_lib.py
imports: from absl import logging
  import apache_beam
  from ddsp import spectral_ops
  import numpy
  import pydub
  import tensorflow.compat.v2
label_desc: Use image node_id 9 for calling a global function with example usage: _eval_split_partition_fn(example, num_partitions, eval_fraction, all_ids) and returns: int, int