def METHOD_NAME(self, versions):  # pylint: disable=no-self-use
    """Custom JMESPath `sort_versions` function that sorts an array of strings as software versions."""
    try:
        return sorted(versions, key=version_to_tuple)
    # if it wasn't sortable, return the input so the pipeline continues
    except (TypeError, ValueError):
        return versions