def METHOD_NAME():
  def new_filter_fn(dataset, predicate):
    return dataset.filter(predicate)
  def legacy_filter_fn(dataset, predicate):
    return dataset.filter_with_legacy_function(predicate)
  return (combinations.combine(
      tf_api_version=[1, 2],
      mode=["eager", "graph"],
      apply_filter=combinations.NamedObject("new_filter_fn", new_filter_fn)) +
          combinations.combine(
              tf_api_version=1,
              mode=["eager", "graph"],
              apply_filter=combinations.NamedObject("legacy_filter_fn",
                                                    legacy_filter_fn)))