class_docstr: A flattening block.
  
  :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 num_flatten_dims: the number of dimensions to flatten out (from right).
docstr: implementation of :class:`~maze.perception.blocks.base.PerceptionBlock` interface
          
code: def forward(
      self, block_input: Dict[str, torch.Tensor]
  ) -> Dict[str, torch.Tensor]:
      """implementation of :class:`~maze.perception.blocks.base.PerceptionBlock` interface"""
  
      # prepare input tensor
      input_tensor = block_input[self.in_keys[0]]
  
      # forward pass
      output_tensor = torch.flatten(
          input_tensor, start_dim=-self.num_flatten_dims
      )
  
      return {self.out_keys[0]: output_tensor}
  
file_path: maze/maze/perception/blocks/general/flatten.py
imports: from typing import Union, List, Sequence, Dict
  import torch
  from maze.core.annotations import override
  from maze.perception.blocks.base import PerceptionBlock
label_desc: Use image node_id 2 for calling the FlattenBlock obj's underlying member method code with example usage: obj.forward(block_input) and returns: dict