code: def encode(self, val, dtype=None) -> FV:
      if isinstance(val, torch.Tensor):
          assert val.ndim == 0, "only scalar supported"
          dtype = val.dtype
          val = val.item()
      # if dtype == torch.float64:
      #     return self.encode_f64(val)
      # if dtype == torch.float32:
      #     return self.encode_f32(val)
      if dtype == torch.int64:
          return self.encode_i64(val)
      if dtype == torch.int32:
          return self.encode_i32(val)
      raise NotImplementedError(f"{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 10 for calling the Coder obj's underlying member method code with example usage: obj.encode(val, dtype) and returns: self, self