code: def int_or_float_or_numstr(value):
      if isinstance(value, int):
          return value
      elif isinstance(value, float):
          assert 0 < value < 1, value
          return Fraction(value)
      elif isinstance(value, (str, Fraction)):
          num = Fraction(value)
          if num.denominator == 1:
              return num.numerator  # int
          else:
              return num
      else:
          raise TypeError("Unsupported value type: %s" % type(value))
  
file_path: espnet/egs2/aishell4/enh1/local/split_train_dev.py
imports: import math
  import random
  from collections import Counter, defaultdict
  from fractions import Fraction
  from pathlib import Path
  from typing import List, Tuple
label_desc: Use image node_id 1 for calling a global function with example usage: int_or_float_or_numstr(value) and returns: value, Fraction, num, num