def METHOD_NAME(self, data, map, targets):
    # Create a dict with pairs between the map and the target values
    # Vectorize its dictionary lookup and perform the vector function on the data
    try:
        return np.vectorize(dict(zip(map, targets)).get)(data)
    except TypeError:
        raise SourceQualityError("Missing GIDs in external map.")