def METHOD_NAME(
    path_1: jsonpath_ng.JSONPath, path_2: jsonpath_ng.JSONPath
) -> jsonpath_ng.JSONPath:
    """
    given two jsonpath nodes, return the most specific and narrow one
    e.g. an index is more specific than a slice, a filter is more specific than
    a slice, etc.
    if the two nodes are not compatible, return None. e.g. a filter and an index
    might cover different sets of data, so not compatible
    """
    if path_1 == path_2:
        return path_1
    if isinstance(path_1, jsonpath_ng.Fields) and isinstance(
        path_2, jsonpath_ng.Fields
    ):
        if path_1.fields == ("*",):
            return path_2
        if path_2.fields == ("*",):
            return path_1
    elif isinstance(path_1, jsonpath_ng.Index) and isinstance(
        path_2, (jsonpath_ng.Slice, jsonpath_ng.ext.filter.Filter)
    ):
        return path_1
    elif isinstance(
        path_1, (jsonpath_ng.Slice, jsonpath_ng.ext.filter.Filter)
    ) and isinstance(path_2, jsonpath_ng.Index):
        return path_2
    elif isinstance(path_1, jsonpath_ng.ext.filter.Filter) and isinstance(
        path_2, jsonpath_ng.Slice
    ):
        return path_1
    elif isinstance(path_1, jsonpath_ng.Slice) and isinstance(
        path_2, jsonpath_ng.ext.filter.Filter
    ):
        return path_2
    return None