def dict_to_object(self, d):
for k, v in list(d.items()):<EOL><INDENT>if isinstance(v, six.string_types) and len(v) == <NUM_LIT>:<EOL><INDENT>try:<EOL><INDENT>d[k] = datetime.strptime(v, "<STR_LIT>")<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>elif isinstance(v, six.string_types) and len(v) > <NUM_LIT:20>:<EOL><INDENT>try:<EOL><INDENT>d[k] = datetime.strptime(v, "<STR_LIT>")<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>elif isinstance(v, list):<EOL><INDENT>d[k] = [self.string_to_datetime(elem) for elem in v]<EOL><DEDENT><DEDENT>return DotDict(d)<EOL>
Decode datetime value from string to datetime