'Determines whether function list contains version intervals
intersections or not. General algorithm:
https://en.wikipedia.org/wiki/Intersection_algorithm
:param func_list: list of VersionedMethod objects
:return: boolean'

@staticmethod
def check_for_versions_intersection(func_list):

    pairs = []
    counter = 0
    for f in func_list:
        pairs.append((f.start_version, 1, f))
        pairs.append((f.end_version, (-1), f))
    def compare(x):
        return x[0]
    pairs.sort(key=compare)
    for p in pairs:
        counter += p[1]
        if (counter > 1):
            return True
    return False
