class_docstr: A sequential module that passes timestep embeddings to the children that
  support it as an extra input.
class_docstr_tok: ["A","sequential","module","that","passes","timestep","embeddings","to","the","children","that","support","it","as","an","extra","input","."]
code: def forward(self, x, emb, context=None):
      for layer in self:
          if isinstance(layer, TimestepBlock):
              x = layer(x, emb)
          elif isinstance(layer, SpatialTransformer):
              x = layer(x, context)
          else:
              x = layer(x)
      return x
  
imports: from abc import abstractmethod
  from functools import partial
  import math
  from typing import Iterable
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from ldm.modules.diffusionmodules.util import checkpoint, conv_nd, linear, avg_pool_nd, zero_module, normalization, timestep_embedding
  from ldm.modules.attention import SpatialTransformer
label_desc: Use image node_id 1 for calling the TimestepEmbedSequential obj's underlying member method code with example usage: obj.forward(x, emb, context) and returns: x