def METHOD_NAME(value: str) -> Union[list, dict, str]:
    """
    All values passed through the SageMaker API are encoded as strings. Thus we
    pro-actively decode values that seem like arrays or dicts.
    Integer values (e.g. `"1"`) are handled by pydantic models further down the
    pipeline.
    """
    value = value.strip()
    # TODO: is this the right way to do things?
    #       what about fields which start which match the pattern for
    #       some reason?
    is_list = value.startswith("[") and value.endswith("]")
    is_dict = value.startswith("{") and value.endswith("}")
    if is_list or is_dict:
        return load_json(value)
    else:
        return value