code: def _forward(self, x, context=None, timesteps=None):
      assert self.timesteps or timesteps
      assert (
          not (self.timesteps and timesteps)
          or self.timesteps == timesteps
      )
      timesteps = self.timesteps or timesteps
      B, S, C = x.shape
      x = rearrange(x, "(b t) s c -> (b s) t c", t=timesteps)
  
      if self.ff_in:
          x_skip = x
          x = self.ff_in(self.norm_in(x))
          if self.is_res:
              x += x_skip
  
      if self.disable_self_attn:
          x = self.attn1(self.norm1(x), context=context) + x
      else:
          x = self.attn1(self.norm1(x)) + x
  
      if self.attn2 is not None:
          if self.switch_temporal_ca_to_sa:
              x = self.attn2(self.norm2(x)) + x
          else:
              x = self.attn2(self.norm2(x), context=context) + x
      x_skip = x
      x = self.ff(self.norm3(x))
      if self.is_res:
          x += x_skip
  
      x = rearrange(
          x,
          "(b s) t c -> (b t) s c",
          s=S,
          b=B // timesteps,
          c=C,
          t=timesteps,
      )
      return x
  
file_path: generative-models/sgm/modules/video_attention.py
imports: import torch
  from ..modules.attention import *
  from ..modules.diffusionmodules.util import AlphaBlender, linear, timestep_embedding
label_desc: Use image node_id 3 for calling the VideoTransformerBlock obj's underlying member method code with example usage: obj._forward(x, context, timesteps) and returns: x