import re


def property_to_snake_case(property_type):
    """Converts a property type to a snake case name.

    Parameters
    ----------
    property_type: type of PhysicalProperty of str
        The property type to convert.

    Returns
    -------
    str
        The property type as a snake case string.
    """

    if not isinstance(property_type, str):
        property_type = property_type.__name__

    return re.sub(r"(?<!^)(?=[A-Z])", "_", property_type).lower()