def METHOD_NAME():
  """
    Runs the interjector pipeline which translates English sentences
    into German using the RunInference API. """
  known_args, pipeline_args = parse_args(sys.argv)
  pipeline_options = PipelineOptions(pipeline_args)
  gen_fn = make_tensor_model_fn('generate')
  model_handler = PytorchModelHandlerTensor(
      state_dict_path=known_args.model_state_dict_path,
      model_class=T5ForConditionalGeneration,
      model_params={
          "config": AutoConfig.from_pretrained(known_args.model_name)
      },
      device="cpu",
      inference_fn=gen_fn)
  eng_sentences = [
      "The house is wonderful.",
      "I like to work in NYC.",
      "My name is Shubham.",
      "I want to work for Google.",
      "I am from India."
  ]
  task_prefix = "translate English to German: "
  task_sentences = [task_prefix + sentence for sentence in eng_sentences]
  tokenizer = AutoTokenizer.from_pretrained(known_args.model_name)
  # [START Pipeline]
  with beam.Pipeline(options=pipeline_options) as pipeline:
    _ = (
        pipeline
        | "CreateInputs" >> beam.Create(task_sentences)
        | "Preprocess" >> beam.ParDo(Preprocess(tokenizer=tokenizer))
        | "RunInference" >> RunInference(model_handler=model_handler)
        | "PostProcess" >> beam.ParDo(Postprocess(tokenizer=tokenizer)))
  # [END Pipeline]