def compare_spatial_references(sr0, sr1):
    """ Return true if two spatial references are the same. """
    if sr0 is None:
        return sr1 is None
    elif sr1 is None:
        return False
    else:
        return sr0.IsSame(sr1)