<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def zoomlevel(self):
 """Retrieves zoomlevel from the output response Returns: zoomlevel (namedtuple):
 A namedtuple of zoomlevel from the output response """

        resources = self.get_resource()
        zoomlevel = namedtuple('zoomlevel', 'zoomLevel')
        try:
            return [zoomlevel(resource['zoomLevel'])
                    for resource in resources]
        except TypeError:
            try:
                if isinstance(resources['ElevationData'], dict):
                    return zoomlevel(resources['ElevationData']['ZoomLevel'])
            except KeyError:
                try:
                    if isinstance(resources['SeaLevelData'], dict):
                        zoom = resources['SeaLevelData']['ZoomLevel']
                        return zoomlevel(zoom)
                except KeyError:
                    print(KeyError)