code: def parse_shape_str(s):
      match = _SHAPE_RE.match(s)
      if not match:
          raise ValueError(
              f'Invalid shape {s}. Valid example: "f32[1,2,3]".'
              f"Note that dtype must be one of {list(_DT)}"
          )
      dtype = _DT[match.group(1)]
      if match.group(2):
          shape = tuple(
              int(d.strip()) for d in match.group(2).split(",")
          )
      else:
          shape = ()
      return jax.core.ShapedArray(shape, dtype)
  
file_path: jax/jax/tools/jax_to_ir.py
imports: from ast import literal_eval
  import importlib
  import functools
  import re
  from absl import app
  from absl import flags
  import jax
  import jax.numpy
label_desc: Use image node_id 4 for calling a global function with example usage: parse_shape_str(s) and returns: jax