code: def mk_result_types_and_shapes(
      shape_type_pairs: Sequence[ShapeTypePair],
  ) -> tuple[list[ir.Type], list[ir.Value] | None]:
      result_types: list[ir.Type] = []
      result_shapes: list[ir.Value] = []
      has_dynamic_shapes = any(
          any(not isinstance(d, int) for d in rshape)
          for rshape, _ in shape_type_pairs
      )
      for rshape, rtype in shape_type_pairs:
          if has_dynamic_shapes:
              result_shapes.append(shape_tensor(rshape))
          result_types.append(
              ir.RankedTensorType.get(
                  [
                      d
                      if isinstance(d, int)
                      else ir.ShapedType.get_dynamic_size()
                      for d in rshape
                  ],
                  rtype,
              )
          )
      return (
          result_types,
          result_shapes if has_dynamic_shapes else None,
      )
  
file_path: jax/jaxlib/hlo_helpers.py
imports: from __future__ import annotations
  from collections.abc import Sequence
  from functools import partial
  from typing import Callable, Union
  import jaxlib.mlir.ir
  import jaxlib.mlir.dialects.stablehlo
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: mk_result_types_and_shapes(shape_type_pairs) and returns: result_types,  unknown