code: def encrypt_encoded_f(tensor, encryptor):
      if isinstance(tensor, torch.Tensor):
          return encryptor.encrypt_encoded(tensor.detach())
      else:
          # torch tensor-like
          if hasattr(tensor, "__torch_function__"):
              return tensor.__torch_function__(
                  encrypt_encoded_f,
                  (type(tensor),),
                  (tensor, encryptor),
                  None,
              )
      raise NotImplementedError("")
  
file_path: FATE/python/fate/arch/tensor/_custom_ops.py
imports: import torch
label_desc: Use image node_id 2 for calling a global function with example usage: encrypt_encoded_f(tensor, encryptor) and returns: encryptor, tensor