<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _data_from_response(self, resp_body, key=None):
 """ This works for most API responses, but some don't structure their listing responses the same way, so overriding this method allows subclasses to handle extraction for those outliers. """

        if key:
            data = resp_body.get(key)
        else:
            data = resp_body.get(self.plural_response_key, resp_body)
        # NOTE(ja): some services, such as keystone returns values as list as
        # {"values": [ ... ]} unlike other services which just return the
        # list.
        if isinstance(data, dict):
            try:
                data = data["values"]
            except KeyError:
                pass
        return data