code: def setup(build=True, installdir="MalmoPlatform"):
      
  
      gradlew = './gradlew'
      if os.name == 'nt':
          gradlew = 'gradlew.bat'
  
      cwd = os.getcwd()
      os.chdir(installdir)
      os.chdir("Minecraft")
      try:
          # Create the version properties file.
          pathlib.Path("src/main/resources/version.properties").write_text("malmomod.version={}\n".format(malmo_version))
          # Optionally do a test build.
          if build:
              subprocess.check_call([gradlew, "setupDecompWorkspace", "build", "testClasses",
                                     "-x", "test", "--stacktrace", "-Pversion={}".format(malmo_version)])
          minecraft_dir = os.getcwd()
      finally:
          os.chdir(cwd)
      return minecraft_dir
docs: Set up Minecraft for use with the MalmoEnv gym environment