code: def forward(
      self, net: Tensor, indices: List[Tuple[int, ...]]
  ) -> Tensor:
      for i, pack in enumerate(indices):
          if len(pack) != self.order:
              raise ValueError(
                  f"length of every tuple in indices must be {self.order}, "
                  f"but got {pack} at index {i}"
              )
      B = len(net)
      D = len(indices)
      # [B, D, order]
      net = net[..., indices]
      # [B, order, D]
      net = net.transpose(1, 2)
      # [B, 1, order, D]
      net = net.reshape(B, 1, self.order, D)
      # [B, num_bases, order, D]
      net = net.repeat_interleave(self.num_bases, 1)
      # [B, num_bases * order, D]
      net = net.contiguous().view(B, self.num_bases * self.order, D)
      # [B, num_bases, D]
      net = self.net(net)
      # [B, D, num_bases]
      return net.transpose(1, 2).contiguous()
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from typing import Dict
  from typing import List
  from typing import Tuple
  from typing import Optional
  from itertools import combinations
  from .base import MLModel
  from ...schema import MLEncoderSettings
  from ...schema import MLGlobalEncoderSettings
  from ...misc.toolkit import eval_context
  from ...modules.blocks import Activation
label_desc: Use image node_id 2 for calling the NBMBlock obj's underlying member method code with example usage: obj.forward(net, indices) and returns: net