def METHOD_NAME(env_name, usr_modification, nohang, timeout=None):
    if usr_modification.startswith("file:/"):
        parse = urlparse(usr_modification)
        file_path = os.path.abspath(os.path.join(parse.netloc, parse.path))
        usr_modification = fileoperations.get_environment_from_file(env_name, path=file_path)
    else:
        try:
            usr_modification = safe_load(usr_modification)
        except (ScannerError, ParserError):
            try:
                usr_modification = loads(usr_modification)
            except JSONDecodeError:
                raise InvalidSyntaxError('The environment configuration contains invalid syntax. Make sure your input '
                                         'matches one of the supported formats: JSON, YAML')
    changes = []
    if "OptionSettings" in usr_modification:
        changes = EnvironmentSettings.convert_usr_model_to_api(usr_modification["OptionSettings"])
    remove = []
    if "OptionsToRemove" in usr_modification:
        remove = EnvironmentSettings.convert_usr_model_to_api(usr_modification["OptionsToRemove"])
    platform_arn = None
    if "PlatformArn" in usr_modification:
        platform_arn = usr_modification["PlatformArn"]
    if changes == [] and remove == [] and platform_arn is None:
        io.log_warning('No changes made. Exiting.')
        return
    if fileoperations.env_yaml_exists():
        io.echo(strings['config.envyamlexists'])
    commonops.update_environment(env_name, changes, nohang,
                                 remove=remove, timeout=timeout,
                                 solution_stack_name=None,
                                 platform_arn=platform_arn)