code: def encrypt_f(tensor, encryptor):
      if isinstance(tensor, torch.Tensor):
          return encryptor.encrypt_tensor(tensor.detach())
      else:
          # torch tensor-like
          if hasattr(tensor, "__torch_function__"):
              return tensor.__torch_function__(
                  encrypt_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 1 for calling a global function with example usage: encrypt_f(tensor, encryptor) and returns: encryptor, tensor