code: def dim_value(dim: Optional[int] = None) -> int:
      return 1 if dim is None else tf.compat.dimension_value(dim)
  
imports: from typing import List, Optional
  import tensorflow
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 1 for calling a global function with example usage: dim_value(dim) and returns: unknown