code: def tensor_shape_proto(outputsize):
      """Create an object matching a tensor_shape field.
  
      Follows https://github.com/tensorflow/tensorboard/blob/master/tensorboard/compat/proto/tensor_shape.proto .
      """
      return TensorShapeProto(
          dim=[TensorShapeProto.Dim(size=d) for d in outputsize]
      )
  
imports: from typing import Optional
  from tensorboard.compat.proto.node_def_pb2 import NodeDef
  from tensorboard.compat.proto.attr_value_pb2 import AttrValue
  from tensorboard.compat.proto.tensor_shape_pb2 import TensorShapeProto
label_desc: Use image node_id 2 for calling a global function with example usage: tensor_shape_proto(outputsize) and returns: TensorShapeProto