private PythonMap(
      PythonCallableSource pythonFunction, Coder<?> outputCoder, String pythonTransform) {
    this.pythonFunction = pythonFunction;
    this.outputCoder = outputCoder;
    this.pythonTransform = pythonTransform;
    this.extraPackages = new ArrayList<>();
  }
@Test
  @Category({ValidatesRunner.class, UsesPythonExpansionService.class})
  public void testPythonMap() {
    PCollection<String> output =
        testPipeline
            .apply("CreateData", Create.of(ImmutableList.of("a", "b", "c", "d")))
            .apply(
                "ApplyPythonMap",
                PythonMap.<String, String>viaMapFn("lambda x:3*x", StringUtf8Coder.of())
                    .withExpansionService(expansionAddr));
    PAssert.that(output).containsInAnyOrder("aaa", "bbb", "ccc", "ddd");
  }