code: def allocate_buffers(self, shape_dict=None, device="cuda"):
      for idx in range(trt_util.get_bindings_per_profile(self.engine)):
          binding = self.engine[idx]
          if shape_dict and binding in shape_dict:
              shape = shape_dict[binding]
          else:
              shape = self.engine.get_binding_shape(binding)
          dtype = trt.nptype(self.engine.get_binding_dtype(binding))
          if self.engine.binding_is_input(binding):
              self.context.set_binding_shape(idx, shape)
          tensor = torch.empty(
              tuple(shape), dtype=numpy_to_torch_dtype_dict[dtype]
          ).to(device=device)
          self.tensors[binding] = tensor
          self.buffers[binding] = cuda.DeviceView(
              ptr=tensor.data_ptr(), shape=shape, dtype=dtype
          )
  
imports: from collections import OrderedDict
  from copy import copy
  import numpy
  import tensorrt
  import torch
  from polygraphy import cuda
  from polygraphy.backend.common import bytes_from_path
  from polygraphy.backend.trt import engine_from_bytes
  from polygraphy.backend.trt import util
label_desc: Use image node_id 6 for calling the Engine obj's underlying member method code with example usage: obj.allocate_buffers(shape_dict, device) without return types