code: def patch_default_base_profile(conan_api, profile_abs_path):
      
      text = tools.load(profile_abs_path)
      if "include(default)" in text:  # User didn't specified a custom profile
          if Version(conan_version) < Version("1.12.0"):
              cache = conan_api._client_cache
          else:
              cache = conan_api._cache
  
          default_profile_name = os.path.basename(cache.default_profile_path)
          if not os.path.exists(cache.default_profile_path):
              conan_api.create_profile(default_profile_name, detect=True)
  
          if default_profile_name != "default":  # User have a different default profile name
              # https://github.com/conan-io/conan-package-tools/issues/121
              text = text.replace("include(default)", "include(%s)" % default_profile_name)
              tools.save(profile_abs_path, text)
docs: If we have a profile including default, but the users default in config is that the default
      is other, we have to change the include