def get_height_levels(coord_data):
    """Gets height level values from coords nested dictionary and sets pressure
    value based on whether heights or pressures key is used.

    Args:
        coord_data (Dict):
            Dictionary containing values to use for either height or pressure levels.

    Returns:
        Tuple[List(float), bool]:
            A tuple containing a list of values to use for the height/pressure dimension
            and a bool specifying whether the coordinate should be created as height
            levels or pressure levels.
    """
    height_levels = None
    pressure = False

    if "heights" in coord_data:
        height_levels = coord_data["heights"]
    elif "pressures" in coord_data:
        height_levels = coord_data["pressures"]
        pressure = True

    return height_levels, pressure