def METHOD_NAME(keras_model,
                          representative_dataset_gen,
                          int16=False):
  '''Convert and quantize the keras model using the standard tflite converter'''
  converter = tf.lite.TFLiteConverter.from_keras_model(keras_model)
  converter.optimizations = [tf.lite.Optimize.DEFAULT]
  converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8]
  if int16:
    converter.target_spec.supported_ops = [
        tf.lite.OpsSet.
        EXPERIMENTAL_TFLITE_BUILTINS_ACTIVATIONS_INT16_WEIGHTS_INT8
    ]
  converter.representative_dataset = representative_dataset_gen
  return converter.convert()