code: private void tryToMoveMemberFunction(
        NameInfo nameInfo, JSModule deepestCommonModuleRef, ClassMemberFunction classMemberFunction) {
  
      // We should only move a property across chunks if:
      // 1) We can move it deeper in the chunk graph,
      // 2) and it's a normal member function, and not a GETTER_DEF or a SETTER_DEF,
      // 3) and the class is available in the global scope.
      Var rootVar = classMemberFunction.getRootVar();
      if (rootVar == null || !rootVar.isGlobal()) {
        return;
      }
  
      Node definitionNode = classMemberFunction.getDefinitionNode();
  
      // Only attempt to move normal member functions.
      // A getter or setter cannot be as easily defined outside of the class to which it belongs.
      if (!definitionNode.isMemberFunctionDef()) {
        return;
      }
  
      if (moduleGraph.dependsOn(deepestCommonModuleRef, classMemberFunction.getModule())) {
        if (hasUnmovableRedeclaration(nameInfo, classMemberFunction)) {
          // If it has been redeclared on the same object, skip it.
          return;
        }
  
        Node destinationParent = compiler.getNodeForCodeInsertion(deepestCommonModuleRef);
        String className = rootVar.getName();
        if (noStubFunctions) {
          moveClassInstanceMethodWithoutStub(className, definitionNode, destinationParent);
        } else {
          moveClassInstanceMethodWithStub(className, definitionNode, destinationParent);
        }
      }
    }
docs: If possible, move a class instance member function definition to the deepest chunk common to
  all uses of the method.
  
  @param nameInfo information about all definitions of the given property name
  @param deepestCommonModuleRef all uses of the method are either in this chunk or in chunks that
  depend on it
  @param classMemberFunction definition of the method within its class body