from typing import Dict
from typing import Any


def geometries_match(geometry_a: Dict[str, Any],
                     geometry_b: Dict[str, Any],
                     likeness_tol: float = 0.001
                     ) -> bool:
    """Determine whether two site geometries match.

    Geometry data should be formatted the same as produced by
    :meth:`robocrys.site.SiteAnalyzer.get_site_geometry`.

    Args:
        geometry_a: The first set of geometry data.
        geometry_b: The second set of geometry data.
        likeness_tol: The tolerance used to determine if two likeness parameters
            are the same.

    Returns:
        Whether the two geometries are the same.
    """
    return (geometry_a['type'] == geometry_b['type'] and
            abs(geometry_a['likeness'] - geometry_b['likeness']) < likeness_tol)