class_docstr: A block applying a custom callable. It processes a tensor or sequence of tensors and returns a tensor or sequence
  of tensors. If the callable has more than one argument the names of the arguments of the function declaration have
  to match the in_keys of the tensors.
  
  :param in_keys: One key identifying the input tensors.
  :param out_keys: One key identifying the output tensors.
  :param in_shapes: List of input shapes.
  :param func: A simple callable taking a tensor or a sequence of tensors and returning a tensor or a sequence of
      tensors.
class_docstr_tok: ["A","block","applying","a","custom","callable",".","It","processes","a","tensor","or","sequence","of","tensors","and","returns","a","tensor","or","sequence","of","tensors",".","If","the","callable","has","more","than","one","argument","the","names","of","the","arguments","of","the","function","declaration","have","to","match","the","in_keys","of","the","tensors",".",":","param","in_keys",":","One","key","identifying","the","input","tensors",".",":","param","out_keys",":","One","key","identifying","the","output","tensors",".",":","param","in_shapes",":","List","of","input","shapes",".",":","param","func",":","A","simple","callable","taking","a","tensor","or","a","sequence","of","tensors","and","returning","a","tensor","or","a","sequence","of","tensors","."]
code: def __init__(
      self,
      in_keys: Union[str, List[str]],
      out_keys: Union[str, List[str]],
      in_shapes: Union[Sequence[int], List[Sequence[int]]],
      func: Callable[
          [Union[torch.Tensor, Sequence[torch.Tensor]]],
          Union[torch.Tensor, Sequence[torch.Tensor]],
      ],
  ):
      super().__init__(
          in_keys=in_keys, out_keys=out_keys, in_shapes=in_shapes
      )
      self.func = func
  
file_path: maze/maze/perception/blocks/general/functional.py
imports: import inspect
  import types
  from typing import Union, List, Sequence, Dict, Callable
  import torch
  from maze.core.annotations import override
  from maze.perception.blocks.base import PerceptionBlock
label_desc: Use image node_id 1 to create a new FunctionalBlock object from inherited base classes: PerceptionBlock with example: obj = FunctionalBlock(in_keys, out_keys, in_shapes, func)