<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def typeof_rave_data(value):
 """Function to duck-type values, not relying on standard Python functions because, for example, a string of '1' should be typed as an integer and not as a string or float since we're trying to replace like with like when scrambling."""


    # Test if value is a date
    for format in ['%d %b %Y', '%b %Y', '%Y', '%d %m %Y', '%m %Y', '%d/%b/%Y', '%b/%Y', '%d/%m/%Y', '%m/%Y']:
        try:
            datetime.datetime.strptime(value, format)
            if len(value) == 4 and (int(value) < 1900 or int(value) > 2030):
                break
            return ('date', format)
        except ValueError:
            pass
        except TypeError:
            pass

    # Test if value is a time
    for format in ['%H:%M:%S', '%H:%M', '%I:%M:%S', '%I:%M', '%I:%M:%S %p', '%I:%M %p']:
        try:
            datetime.datetime.strptime(value, format)
            return ('time', format)
        except ValueError:
            pass
        except TypeError:
            pass

    # Test if value is a integer
    try:
        if ((isinstance(value, str) and isinstance(int(value), int)) \
                    or isinstance(value, int)):
            return ('int', None)
    except ValueError:
        pass
    except TypeError:
        pass

    # Test if value is a float
    try:
        float(value)
        return ('float', None)
    except ValueError:
        pass
    except TypeError:
        pass

    # If no match on anything else, assume its a string
    return ('string', None)