code: def pack_encode_float_tensor(
      self,
      tensor: torch.DoubleTensor,
      offset_bit: int,
      pack_num: int,
      precision: int,
  ):
      if isinstance(tensor, torch.Tensor):
          from fate.arch.unify import device
  
          from ._tensor import PHETensorEncoded
  
          shape = tensor.shape
          dtype = tensor.dtype
          data = self._coder.pack_floats(
              tensor, offset_bit, pack_num, precision
          )
          return PHETensorEncoded(
              self._coder,
              shape,
              data,
              tensor.dtype,
              device.from_torch_device(tensor.device),
          )
      elif hasattr(tensor, "pack_encode_float_tensor"):
          return tensor.pack_encode_float_tensor(
              self, offset_bit, pack_num, precision
          )
      else:
          raise NotImplementedError(f"`{tensor}` not supported")
  
imports: import typing
  import torch
label_desc: Use image node_id 3 for calling the PHETensorCoder obj's underlying member method code with example usage: obj.pack_encode_float_tensor(tensor, offset_bit, pack_num, precision) and returns: PHETensorEncoded, tensor