def _cmp_by_local_origin(path1, path2):
 if (path1.source == path2.source):
  return None
 if (path1.source is None):
  return path1
 if (path2.source is None):
  return path2
 return None

def _cmp_by_local_origin ( path1 , path2 ) : if ( path1 . source == path2 . source ) : return None if ( path1 . source is None ) : return path1 if ( path2 . source is None ) : return path2 return None
select locally originating path as best path .