def METHOD_NAME(
    metadata: OpenMetadata,
    connection: any,
    service_name: str,
) -> Iterator[Either[AddLineageRequest]]:
    """
    For PGSpider, firstly, get list of multi-tenant tables.
    Next, get child foreign tables of each multi-tenant tables.
    Get entities of source and target table to create Lineage request.
    """
    for multi_tenant_table in _get_multi_tenant_tables(connection):
        database = multi_tenant_table["database"]
        schema = multi_tenant_table["nspname"]
        target_table = multi_tenant_table["relname"]
        target_entities = search_table_entities(
            metadata=metadata,
            service_name=service_name,
            database=database,
            database_schema=schema,
            table=target_table,
        )
        for child_foreign_table in _get_child_tables(connection, target_table):
            source_entities = search_table_entities(
                metadata=metadata,
                service_name=service_name,
                database=database,
                database_schema=schema,
                table=child_foreign_table["relname"],
            )
            for target_entity in target_entities:
                for source_entity in source_entities:
                    column_lineages = _get_column_lineages(source_entity, target_entity)
                    lineage_details = LineageDetails(
                        columnsLineage=column_lineages,
                    )
                    yield AddLineageRequest(
                        edge=EntitiesEdge(
                            fromEntity=EntityReference(
                                id=source_entity.id, type="table"
                            ),
                            toEntity=EntityReference(id=target_entity.id, type="table"),
                            lineageDetails=lineage_details,
                        )
                    )