class_docstr: A repeat-to-match block.
  This blocks takes two tensors and a dimension index as an input. Then when it's
  forward method is called, it matches the specified the dimension (with :param repeat_at_idx) of the first
  tensor with the specified dimension (:param repeat_at_idx)  of the second tensor. This is done by repeating the
  first tensor n times in dimension in dimension :param repeat_at_idx.
  Here n = tensor_1.shape[repeat_at_idx] - tensor_0.shape[repeat_at_idx]. As a constraint the first tensor has to
  satisfy the following condition: tensor_0[repeat_at_idx] == 1
  
  :param in_keys: The keys identifying the input tensors.
  :param out_keys: One key identifying the output tensors.
  :param in_shapes: List of input shapes.
  :param repeat_at_idx: Specify the dimension that should be matched between the tensors.
code: def __init__(
      self,
      in_keys: List[str],
      out_keys: Union[str, List[str]],
      in_shapes: List[Sequence[int]],
      repeat_at_idx: int,
  ):
      super().__init__(
          in_keys=in_keys, out_keys=out_keys, in_shapes=in_shapes
      )
  
      assert isinstance(
          in_keys, list
      ), f"in_keys should be a list not {type(in_keys)}"
      assert (
          len(in_keys) == 2
      ), f"number of in keys should be 2 but got {len(in_keys)}"
      if isinstance(out_keys, list):
          assert (
              len(out_keys) == 1
          ), f"number of out keys should be 1 but got {len(out_keys)}"
      else:
          assert isinstance(out_keys, str)
      assert in_shapes[0][repeat_at_idx] == 1
  
      self.repeat_at_idx = repeat_at_idx
  
file_path: maze/maze/perception/blocks/general/repeat_to_match.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 1 to create a new RepeatToMatchBlock object from inherited base classes: PerceptionBlock with example: obj = RepeatToMatchBlock(in_keys, out_keys, in_shapes, repeat_at_idx)