def keys(self, key_type=None):
        """ Returns a copy of the dictionary's keys.
            @param key_type if specified, only keys for this type will be returned.
                 Otherwise list of tuples containing all (multiple) keys will be returned."""
        if key_type is not None:
            intermediate_key = str(key_type)
            if intermediate_key in self.__dict__:
                return self.__dict__[intermediate_key].keys()
        else:
            all_keys = {} # in order to preserve keys() type (dict_keys for python3) 
            for keys in self.items_dict.keys():
                all_keys[keys] = None
            return all_keys.keys()
Returns a copy of the dictionary's keys.
            @param key_type if specified, only keys for this type will be returned.
                 Otherwise list of tuples containing all (multiple) keys will be returned.