code: def encode_vec(self, vec: V, dtype: torch.dtype = None) -> FV:
      if dtype is None:
          dtype = vec.dtype
      else:
          if dtype != vec.dtype:
              vec = vec.to(dtype=dtype)
      # if dtype == torch.float64:
      #     return self.encode_f64_vec(vec)
      # if dtype == torch.float32:
      #     return self.encode_f32_vec(vec)
      if dtype == torch.int64:
          return self.encode_i64_vec(vec)
      if dtype == torch.int32:
          return self.encode_i32_vec(vec)
      raise NotImplementedError(f"{vec.dtype} not supported")
  
imports: from typing import List, Optional, Tuple
  import torch
  from fate_utils.ou import CiphertextVector, PlaintextVector
  from fate_utils.ou import Coder
  from fate_utils.ou import Evaluator
  from fate_utils.ou import PK
  from fate_utils.ou import SK
  from fate_utils.ou import keygen
  from .type import TensorEvaluator
label_desc: Use image node_id 8 for calling the Coder obj's underlying member method code with example usage: obj.encode_vec(vec, dtype) and returns: self, self