class_docstr: DslContext for ForEach.
class_docstr_tok: ["DslContext","for","ForEach","."]
code: def validate(self, containing_nodes: Sequence[_BaseNode]):
      for parent in self.ancestors:
          if isinstance(parent, ForEachContext):
              raise NotImplementedError(
                  "Nested ForEach block is not supported yet."
              )
  
      if len(containing_nodes) > 1:
          raise NotImplementedError(
              "Cannot define more than one component within ForEach yet."
          )
  
file_path: tfx/tfx/dsl/control_flow/for_each_internal.py
imports: from typing import Any, Sequence, Callable, Dict, TypeVar, Generic
  import attr
  from tfx.dsl.context_managers import dsl_context
  from tfx.types import channel
label_desc: Use image node_id 3 for calling the ForEachContext obj's underlying member method code with example usage: obj.validate(containing_nodes) without return types