def _get_maximum_text_similarity(
    handler, issue_id: str, commit_hash: str, file_paths: list, default: float
) -> float:
    """Get the maximum file similarity

    If no handler is available, None is returned

    :param handler: text similarity handler
    :param issue_id: issue id
    :param commit_hash: commit hash
    :param file_paths: list of file paths in the commit
    :param default: default value
    :return: max value
    """
    assert handler is not None

    def get_sim(file_path: str) -> float:
        return handler.get_sim(issue_id, commit_hash, file_path)

    sim_values = map(get_sim, file_paths)
    return max((val for val in sim_values if val is not None), default=default)