def METHOD_NAME(cube, height_value, units):
    """
    Function to attempt to extract a height level.
    If no matching level is available an error is raised.
    Args:
        cube (cube):
            Cube to be extracted from and checked it worked.
        height_value (float):
            The boundary height to be extracted with the input units.
        units (str):
            The units of the height level to be extracted.
    Returns:
        iris.cube.Cube:
            A cube containing the extracted height level.
    Raises:
        ValueError: If height level is not found in the input cube.
    """
    from improver.utilities.cube_extraction import extract_subcube
    # Write constraint in this format so a constraint is constructed that
    # is suitable for floating point comparison
    height_constraint = [
        "height=[{}:{}]".format(height_value - 0.1, height_value + 0.1)
    ]
    cube = extract_subcube(cube, height_constraint, units=[units])
    if cube is not None:
        return cube
    raise ValueError("No data available at height {}{}".format(height_value, units))