code: def _try_get_shapes(nets):
      """
      Get missing shapes for all blobs contained in the nets.
  
      Args:
          nets: List of core.Net to extract blob shape information from.
  
      Returns:
          Dictionary containing blob name to shape/dimensions mapping. The net
              is a computation graph that is composed of operators, and the
              operators have input and output blobs, each with their own dims.
      """
      try:
          # Note: this will inspect the workspace for better or worse.
          # We don't care about the types, only the shapes
          shapes, _ = workspace.InferShapesAndTypes(nets)
          return shapes
      except Exception as e:
          logger.warning("Failed to compute shapes: %s", e)
          return {}
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import copy
  import logging
  import os
  import re
  from builtins import bytes
  from caffe2.proto import caffe2_pb2
  from caffe2.python import core, workspace
  from .proto.graph_pb2 import GraphDef
  from .proto.node_def_pb2 import NodeDef
  from .proto.tensor_shape_pb2 import TensorShapeProto
label_desc: Use image node_id 23 for calling a global function with example usage: _try_get_shapes(nets) and returns: shapes, dict