def choose_best_location(locations, **kwargs):
 locations = get_ordered_locations(locations, **kwargs)
 if locations:
  return locations[0]
 else:
  return None

def choose_best_location ( locations , ** kwargs ) : locations = get_ordered_locations ( locations , ** kwargs ) if locations : return locations [ 0 ] else : return None
choose best location from image location list by configured strategy .