code: def to_np_shape(
      shape: type_utils.Shape, replace_int=-1
  ) -> Tuple[int]:
      return tuple(
          dim if dim is not None else replace_int for dim in shape
      )
  
file_path: datasets/tensorflow_datasets/core/utils/np_utils.py
imports: from typing import Any, Callable, Tuple, Union
  import numpy
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils import type_utils
  import tree
label_desc: Use image node_id 1 for calling a global function with example usage: to_np_shape(shape, replace_int) and returns: tuple