<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def change_frozen_attr(self):
 """Changes frozen state of cell if there is no selection"""


        # Selections are not supported

        if self.grid.selection:
            statustext = _("Freezing selections is not supported.")
            post_command_event(self.main_window, self.StatusBarMsg,
                               text=statustext)

        cursor = self.grid.actions.cursor

        frozen = self.grid.code_array.cell_attributes[cursor]["frozen"]

        if frozen:
            # We have an frozen cell that has to be unfrozen

            # Delete frozen cache content
            self.grid.code_array.frozen_cache.pop(repr(cursor))

        else:
            # We have an non-frozen cell that has to be frozen

            # Add frozen cache content
            res_obj = self.grid.code_array[cursor]
            self.grid.code_array.frozen_cache[repr(cursor)] = res_obj

        # Set the new frozen state / code
        selection = Selection([], [], [], [], [cursor[:2]])
        self.set_attr("frozen", not frozen, selection=selection)