def sort_func(self, entry):
key = entry[self.sort]<EOL>if self.sort in FLOAT_ATTRIBUTES and not isinstance(key, float):<EOL><INDENT>return <NUM_LIT:0>  <EOL><DEDENT>elif self.sort == '<STR_LIT:time>':<EOL><INDENT>return convert_time(key)<EOL><DEDENT>elif self.sort == '<STR_LIT:date>':<EOL><INDENT>return convert_date(key)<EOL><DEDENT>return key<EOL>
Return the key attribute to determine how data is sorted.
        Time will need to be converted to 24 hour time.
        In instances when float attributes will have an 'n/a' string, return 0.