def decode_query_string_model_auth(model_auth: Optional[str] = None) -> Optional[ModelAuth]:
    """Decodes a url encoded ModelAuth string into a ModelAuth object

    Args:
        model_auth: JSON-serialised, URL encoded ModelAuth dictionary

    Returns:
        model_auth as a ModelAuth object, if found. Otherwise None

    Raises:
        ValidationError if there is trouble parsing the string
    """
    if not model_auth:
        return None
    else:
        as_str = urllib.parse.unquote_plus(model_auth)
        as_objc = ModelAuth.parse_raw(as_str)
        return as_objc
Decodes a url encoded ModelAuth string into a ModelAuth object

    Args:
        model_auth: JSON-serialised, URL encoded ModelAuth dictionary

    Returns:
        model_auth as a ModelAuth object, if found. Otherwise None

    Raises:
        ValidationError if there is trouble parsing the string
    
src/marqo/tensor_search/web/api_utils.py