def METHOD_NAME(ansys_path=None):
    """Give input path back if given, else look for ANSYS_DPF_PATH,
    then among AWP_ROOT and installed ansys-dpf-server modules to take the latest available.
    Parameters
    ----------
    ansys_path : str
        Full path to an Ansys installation to use.
    Returns
    -------
    ansys_path : str
        Full path to an Ansys installation.
    """
    # If no custom path was given in input
    # First check the environment variable for a custom path
    if ansys_path is None:
        ansys_path = os.environ.get("ANSYS_DPF_PATH")
    # Then check for usual installation folders with AWP_ROOT and installed modules
    if ansys_path is None:
        ansys_path = find_ansys()
    # If still no install has been found, throw an exception
    if ansys_path is None:
        raise ValueError(
            "Unable to locate any Ansys installation.\n"
            f'Make sure the "AWP_ROOT{__ansys_version__}" environment variable '
            f"is set if using ANSYS version {__ansys_version__}.\n"
            "You can also manually define the path to the ANSYS installation root folder"
            " of the version you want to use (vXXX folder):\n"
            '- when starting the server with "start_local_server(ansys_path=*/vXXX)"\n'
            '- or by setting it by default with the environment variable "ANSYS_DPF_PATH"'
        )
    return ansys_path