def _convert(x):
    """Generically convert strings to numbers.

    :param x: string that maybe represents a number
    :returns: value
    :rtype: string, float, or int

    """
    try:
        return int(x)
    except ValueError:
        try:
            return float(x)
        except ValueError:
            return x