<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_type_code(value):
 """ Gets TypeCode for specific value. :param value: value whose TypeCode is to be resolved. :return: the TypeCode that corresponds to the passed object's type. """

        if value == None:
            return TypeCode.Unknown

        if not isinstance(value, type):
            value = type(value)

        if value is list:
            return TypeCode.Array
        elif value is tuple:
            return TypeCode.Array
        elif value is set:
            return TypeCode.Array
        elif value is bool:
            return TypeCode.Boolean
        elif value is int:
            return TypeCode.Integer
        # elif value is long:
        #     return TypeCode.Long
        elif value is float:
            return TypeCode.Float
        elif value is str:
            return TypeCode.String
        # elif value is unicode:
        #     return TypeCode.String
        elif value is datetime:
            return TypeCode.DateTime
        elif value is dict:
            return TypeCode.Map
            
        return TypeCode.Object