(
        self, included_nodes: Set[UniqueId], selector: str
    )
yields nodes from included are the specified source.
yields nodes from included are the specified source.
yields nodes from included are the specified source .
def search(
        self, included_nodes: Set[UniqueId], selector: str
    ) -> Iterator[UniqueId]:
        """yields nodes from included are the specified source."""
        parts = selector.split('.')
        target_package = SELECTOR_GLOB
        if len(parts) == 1:
            target_source, target_table = parts[0], None
        elif len(parts) == 2:
            target_source, target_table = parts
        elif len(parts) == 3:
            target_package, target_source, target_table = parts
        else:  # len(parts) > 3 or len(parts) == 0
            msg = (
                'Invalid source selector value "{}". Sources must be of the '
                'form `${{source_name}}`, '
                '`${{source_name}}.${{target_name}}`, or '
                '`${{package_name}}.${{source_name}}.${{target_name}}'
            ).format(selector)
            raise RuntimeException(msg)

        for node, real_node in self.source_nodes(included_nodes):
            if target_package not in (real_node.package_name, SELECTOR_GLOB):
                continue
            if target_source not in (real_node.source_name, SELECTOR_GLOB):
                continue
            if target_table not in (None, real_node.name, SELECTOR_GLOB):
                continue

            yield node
def search ( self , included_nodes : Set [ UniqueId ] , selector : str ) -> Iterator [ UniqueId ] : parts = selector . split ( '.' ) target_package = SELECTOR_GLOB if len ( parts ) == 1 : target_source , target_table = parts [ 0 ] , None elif len ( parts ) == 2 : target_source , target_table = parts elif len ( parts ) == 3 : target_package , target_source , target_table = parts else : # len(parts) > 3 or len(parts) == 0 msg = ( 'Invalid source selector value "{}". Sources must be of the ' 'form `${{source_name}}`, ' '`${{source_name}}.${{target_name}}`, or ' '`${{package_name}}.${{source_name}}.${{target_name}}' ) . format ( selector ) raise RuntimeException ( msg ) for node , real_node in self . source_nodes ( included_nodes ) : if target_package not in ( real_node . package_name , SELECTOR_GLOB ) : continue if target_source not in ( real_node . source_name , SELECTOR_GLOB ) : continue if target_table not in ( None , real_node . name , SELECTOR_GLOB ) : continue yield node