<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def quote_code(self, key):
 """Returns string quoted code """


        code = self.grid.code_array(key)
        quoted_code = quote(code)

        if quoted_code is not None:
            self.set_code(key, quoted_code)