<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _check(self, instance):
        '''
        Perform two series of SNMP requests, one for all that have MIB asociated
        and should be looked up and one for those specified by oids
        '''

        (
            snmp_engine,
            mib_view_controller,
            ip_address,
            tags,
            metrics,
            timeout,
            retries,
            enforce_constraints,
        ) = self._load_conf(instance)

        tags += ['snmp_device:{}'.format(ip_address)]

        table_oids, raw_oids, mibs_to_load = self.parse_metrics(metrics, enforce_constraints)
        try:
            if table_oids:
                self.log.debug("Querying device %s for %s oids", ip_address, len(table_oids))
                table_results = self.check_table(
                    instance,
                    snmp_engine,
                    mib_view_controller,
                    table_oids,
                    True,
                    timeout,
                    retries,
                    enforce_constraints=enforce_constraints,
                    mibs_to_load=mibs_to_load,
                )
                self.report_table_metrics(metrics, table_results, tags)

            if raw_oids:
                self.log.debug("Querying device %s for %s oids", ip_address, len(raw_oids))
                raw_results = self.check_table(
                    instance,
                    snmp_engine,
                    mib_view_controller,
                    raw_oids,
                    False,
                    timeout,
                    retries,
                    enforce_constraints=False,
                )
                self.report_raw_metrics(metrics, raw_results, tags)
        except Exception as e:
            if "service_check_error" not in instance:
                instance["service_check_error"] = "Fail to collect metrics for {} - {}".format(instance['name'], e)
            self.warning(instance["service_check_error"])
        finally:
            # Report service checks
            if "service_check_error" in instance:
                status = Status.DOWN
                if "service_check_severity" in instance:
                    status = instance["service_check_severity"]
                return [(self.SC_STATUS, status, instance["service_check_error"])]

            return [(self.SC_STATUS, Status.UP, None)]