human
Give me a the Python program you requested given the following:
I am working on the file "00_Miscellaneous/tf_train_eval_export/Tutorial - TensorFlow from Estimators to Keras.ipynb".
The first task is:
Building a Keras Model

Implement a data input_fn process the data for the Keras model
Create the Keras model
Create the callbacks
Run the experiment

1. Data input_fn
A typical way of feed data into Keras is to convert it to a numpy array and pass it to the model.fit() function of the model. However, in other (probably more parctical) cases, all the data may not fit into the memory of your worker. Thus, you woud need to either create a reader that reads your data chuck by chuck, and pass it to model.fit_generator(), or to use the tf.data.Dataset APIs, which are much easier to use.
In the input_fn, 
1. Create a CSV dataset (similar to the one used with the TensorFlow Custom Estimator)
2. Create lookups for categorical features vocabolary to numerical index
3. Process the dataset features to:
    * extrat the instance weight column
    * convert the categorical features to numerical index
Can you write Python program for it?
assistant
#Here is the Python program you requested.

def make_keras_input_fn(file_pattern, batch_size, mode=tf.estimator.ModeKeys.EVAL):
    
    mapping_tables = {}
        
    mapping_tables[TARGET_NAME] = tf.contrib.lookup.index_table_from_tensor(
        mapping=tf.constant(TARGET_LABELS))

    for feature_name in CATEGORICAL_FEATURE_NAMES:
        mapping_tables[feature_name] = tf.contrib.lookup.index_table_from_tensor(
            mapping=tf.constant(feature_vocabolary[feature_name]))
    try:
        tf.tables_initializer().run(session=tf.keras.backend.get_session()) 
    except:
        pass
            
    def _process_features(features, target):
        
        weight = features.pop(WEIGHT_COLUMN_NAME)
        target = mapping_tables[TARGET_NAME].lookup(target)
        for feature in CATEGORICAL_FEATURE_NAMES:
            features[feature] = mapping_tables[feature].lookup(features[feature])
        return features, target, weight
                        
    def _input_fn():
        
        dataset = tf.data.experimental.make_csv_dataset(
            file_pattern=file_pattern,
            batch_size=batch_size,
            column_names=HEADER,
            column_defaults=HEADER_DEFAULTS,
            label_name=TARGET_NAME,
            field_delim=',',
            use_quote_delim=True,
            header=False,
            shuffle= (mode==tf.estimator.ModeKeys.TRAIN)
        ).map(_process_features)

        return dataset
    
    return _input_fn