<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def deserialize(self, response, response_type):
 """ Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for deserialzied object, or string of class name. :return: deserialized object. """

        # handle file downloading
        # save response body into a tmp file and return the instance
        if "file" == response_type:
            return self.__deserialize_file(response)

        # fetch data from response object
        try:
            data = json.loads(response.data)
        except ValueError:
            data = response.data

        return self.__deserialize(data, response_type)