def METHOD_NAME(self, dataset):
    default_columns_types = []
    default_columns_names = []
    self._label_column_name = None
    for i in self.columns:
        float_types = ["float", "float32", "float64", "double"]
        int_types = ["int", "int8", "int16", "int32", "int64"]
        uint_types = ["uint8", "uint16", "uint32", "uint64"]
        all_types = float_types + int_types + uint_types
        if i.is_label is True:
            self._label_column_name = i.name
        dtype = i.dtype
        if dtype == "string":
            default_val = ""
        elif dtype in all_types:
            default_val = np.dtype(dtype).type(0)
        default_columns_types.append(default_val)
        default_columns_names.append(i.name)
    def parse_csv(value):
        columns = parsing_ops.decode_csv(
            value,
            record_defaults=default_columns_types,
            field_delim=self.field_delim,
        )
        features = dict(zip(default_columns_names, columns))
        labels = features.pop(self._label_column_name)
        return features, labels
    return dataset.map(parse_csv, num_parallel_calls=10)