code: def _create_const_fill_op_from_numpy(
      name, tensor, device_option=None
  ):
      assert type(tensor) == np.ndarray
      kTypeNameMapper = {
          np.dtype("float32"): "GivenTensorFill",
          np.dtype("int32"): "GivenTensorIntFill",
          np.dtype("int64"): "GivenTensorInt64Fill",
          np.dtype("uint8"): "GivenTensorStringFill",
      }
  
      args_dict = {}
      if tensor.dtype == np.dtype("uint8"):
          args_dict.update({"values": [str(tensor.data)], "shape": [1]})
      else:
          args_dict.update({"values": tensor, "shape": tensor.shape})
  
      if device_option is not None:
          args_dict["device_option"] = device_option
  
      return core.CreateOperator(
          kTypeNameMapper[tensor.dtype], [], [name], **args_dict
      )
  
imports: import collections
  import copy
  import functools
  import logging
  import numpy
  import os
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  from unittest import mock
  import caffe2.python.utils
  import torch
  import torch.nn.functional
  from caffe2.proto import caffe2_pb2
  from caffe2.python import core, net_drawer, workspace
  from torch.nn.functional import interpolate
label_desc: Use image node_id 14 for calling a global function with example usage: _create_const_fill_op_from_numpy(name, tensor, device_option) and returns: core