class_docstr: Registry for DslContexts and associated BaseNodes of a pipeline DSL.
  
  DslContextRegistry manages the active DslContexts, their orders, BaseNodes,
  and association between DslContext and BaseNodes during the pipeline DSL
  definition. DslContext and BaseNode always belong to exactly one
  DslContextRegistry (1:n relationship).
class_docstr_tok: ["Registry","for","DslContexts","and","associated","BaseNodes","of","a","pipeline","DSL",".","DslContextRegistry","manages","the","active","DslContexts",",","their","orders",",","BaseNodes",",","and","association","between","DslContext","and","BaseNodes","during","the","pipeline","DSL","definition",".","DslContext","and","BaseNode","always","belong","to","exactly","one","DslContextRegistry","(","1",":","n","relationship",")","."]
docstr: Gets all BaseNodes that belongs to the context.
  
  Args:
    context: A DslContext that has been put to the registry.
  Raises:
    ValueError: If the context is unknown to the registry.
  Returns:
    Nodes that belong to the context, possibly empty list.
docstr_tok: ["Gets","all","BaseNodes","that","belongs","to","the","context",".","Args",":","context",":","A","DslContext","that","has","been","put","to","the","registry",".","Raises",":","ValueError",":","If","the","context","is","unknown","to","the","registry",".","Returns",":","Nodes","that","belong","to","the","context",",","possibly","empty","list","."]
code: def get_nodes(
      self, context: dsl_context.DslContext
  ) -> List[_BaseNode]:
      """Gets all BaseNodes that belongs to the context.
  
      Args:
        context: A DslContext that has been put to the registry.
      Raises:
        ValueError: If the context is unknown to the registry.
      Returns:
        Nodes that belong to the context, possibly empty list.
      """
      if context not in self._all_contexts:
          raise ValueError(
              f"Context {context} does not exist in the registry."
          )
      return list(self._nodes_by_context[context])
  
imports: import collections
  import contextlib
  import threading
  from typing import Any, List, Optional, Iterator
  from tfx.dsl.context_managers import dsl_context
label_desc: Use image node_id 14 for calling the DslContextRegistry obj's underlying member method code with example usage: obj.get_nodes(context) and returns: list