<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_nexus_type(self, nexus_host):
 """Given the nexus host, get the type of Nexus switch. :param nexus_host: IP address of Nexus switch :returns: Nexus type """


        starttime = time.time()
        response = self.client.rest_get(
            snipp.PATH_GET_NEXUS_TYPE, nexus_host)
        self.capture_and_print_timeshot(
            starttime, "gettype",
            switch=nexus_host)

        if response:
            try:
                result = response['imdata'][0]["eqptCh"]['attributes']['descr']
            except Exception:
                # Nexus Type is not depended on at this time so it's ok
                # if can't get the Nexus type. The real purpose
                # of this method is to determine if the connection is active.
                result = ''
            nexus_type = re.findall(
                "Nexus\s*(\d)\d+\s*[0-9A-Z]+\s*"
                "[cC]hassis",
                result)
            if len(nexus_type) > 0:
                LOG.debug("GET call returned Nexus type %d",
                    int(nexus_type[0]))
                return int(nexus_type[0])
        else:
            result = ''

        LOG.debug("GET call failed to return Nexus type. Received %s.",
                  result)
        return -1