import re


def is_family_url(url: str) -> bool:
    """Checks that a given URL points to a Pfam family page, e.g.:
      - http://pfam.xfam.org/family/PF16122
      - http://pfam.xfam.org/family?acc=PF16122
      - http://pfam.xfam.org/family/DIM

    URL with multiple slashes (e.g. http://pfam.xfam.org//family/PF16122)
    are accepted.

    :param url: Pfam URL
    :return: boolean
    """
    pattern = r"http://pfam\.xfam\.org/+family(/+|\?acc=)([a-z0-9_\-]+)/*"
    return re.fullmatch(pattern, url, flags=re.I) is not None