code: def forward(self, x, condition: torch.Tensor, lengths: torch.Tensor):
      for block in self.blocks:
          x = block(x)
          scale = condition.shape[-1] // x.shape[-1]
          x = mask_sequence_tensor(x, (lengths / scale).ceil().long())
  
      x = self.final_conv(x)
  
      scale = condition.shape[-1] // x.shape[-1]
      x = mask_sequence_tensor(x, (lengths / scale).ceil().long())
  
      x = x.mean(axis=-2)
      x = (x / rearrange(lengths / scale, "b -> b 1 1")).sum(axis=-1)
      x = self.to_logit(x)
      return x.squeeze()
  
imports: import math
  from functools import partial
  from math import log2
  from typing import List
  import torch
  import torch.nn.functional
  from einops import rearrange
  from kornia.filters import filter2d
  from nemo.collections.tts.parts.utils.helpers import mask_sequence_tensor
label_desc: Use image node_id 2 for calling the Discriminator obj's underlying member method code with example usage: obj.forward(x, condition, lengths) and returns: x