def METHOD_NAME(new_asset, should_fail=False) -> None:
    setattr(component, expected_location, new_asset)
    validation_result = component._validate()
    if should_fail:
        assert validation_result.passed is False and expected_location in validation_result.error_messages, (
            f"field {expected_location} with value {str(new_asset)} should be invalid, "
            f"but validation message is {repr(validation_result)}"
        )
    else:
        assert validation_result.passed, (
            f"field {expected_location} with value {str(new_asset)} should be valid, "
            f"but met unexpected error: {repr(validation_result)}"
        )