def METHOD_NAME(
    self,
    table_aliases: List[AliasInfo],
    standalone_aliases: List[str],
    references: List[ObjectReferenceSegment],
    col_aliases: List[ColumnAliasInfo],
    using_cols: List[str],
    parent_select: Optional[BaseSegment],
) -> Optional[List[LintResult]]:
    """Check whether any aliases are duplicates.
    NB: Subclasses of this error should override this function.
    """
    # Are any of the aliases the same?
    duplicate = set()
    for a1, a2 in itertools.combinations(table_aliases, 2):
        # Compare the strings
        if a1.ref_str == a2.ref_str and a1.ref_str:
            duplicate.add(a2)
    if duplicate:
        return [
            LintResult(
                # Reference the element, not the string.
                anchor=aliases.segment,
                description=(
                    "Duplicate table alias {!r}. Table " "aliases should be unique."
                ).format(aliases.ref_str),
            )
            for aliases in duplicate
        ]
    else:
        return None