@VisibleForTesting
  static boolean isMultiLanguagePipeline(Pipeline pipeline) {
    class IsMultiLanguageVisitor extends PipelineVisitor.Defaults {
      private boolean isMultiLanguage = false;

      private void performMultiLanguageTest(Node node) {
        if (node.getTransform() instanceof External.ExpandableTransform) {
          isMultiLanguage = true;
        }
      }

      @Override
      public CompositeBehavior enterCompositeTransform(Node node) {
        performMultiLanguageTest(node);
        return super.enterCompositeTransform(node);
      }

      @Override
      public void visitPrimitiveTransform(Node node) {
        performMultiLanguageTest(node);
        super.visitPrimitiveTransform(node);
      }
    }

    IsMultiLanguageVisitor visitor = new IsMultiLanguageVisitor();
    pipeline.traverseTopologically(visitor);

    return visitor.isMultiLanguage;
  }
@Test
  public void testIsMultiLanguage() throws IOException {
    PipelineOptions options = buildPipelineOptions();
    Pipeline pipeline = Pipeline.create(options);
    PCollection<String> col =
        pipeline
            .apply(Create.of("1", "2", "3"))
            .apply(
                External.of(
                    "dummy_urn", new byte[] {}, "", new TestExpansionServiceClientFactory()));

    assertTrue(DataflowRunner.isMultiLanguagePipeline(pipeline));
  }