code: def _create_const_fill_op_from_c2_int8_tensor(name, int8_tensor):
      assert type(int8_tensor) == workspace.Int8Tensor
      kTypeNameMapper = {
          np.dtype("int32"): "Int8GivenIntTensorFill",
          np.dtype("uint8"): "Int8GivenTensorFill",
      }
  
      tensor = int8_tensor.data
      assert tensor.dtype in [np.dtype("uint8"), np.dtype("int32")]
      values = (
          tensor.tobytes()
          if tensor.dtype == np.dtype("uint8")
          else tensor
      )
  
      return core.CreateOperator(
          kTypeNameMapper[tensor.dtype],
          [],
          [name],
          values=values,
          shape=tensor.shape,
          Y_scale=int8_tensor.scale,
          Y_zero_point=int8_tensor.zero_point,
      )
  
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 15 for calling a global function with example usage: _create_const_fill_op_from_c2_int8_tensor(name, int8_tensor) and returns: core