def METHOD_NAME(string):
    """Return a typed representation for the given string.
    The result might be a bool, int or float. The string might also be
    supplemented by a multiplier like KB which would return an int or
    float multiplied by 1024 for example.
    :param string: The string representation.
    """
    for regex, formatter in TYPE_FORMATS:
        match = regex.match(string)
        if match:
            string = formatter(match)
            if len(match.groups()) > 1:
                unit = match.group(2)
                for regex, multiplier in TYPE_MULTIPLIERS:
                    match = regex.match(unit)
                    if match:
                        string *= multiplier
                        break
                else:
                    raise ValueError("Unknown multiplier: %s" % unit)
            break
    return string