<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _parse_mibs(iLOIP, snmp_credentials):
 """Parses the MIBs. :param iLOIP: IP address of the server on which SNMP discovery has to be executed. :param snmp_credentials: a Dictionary of SNMP credentials. auth_user: SNMP user auth_protocol: Auth Protocol auth_prot_pp: Pass phrase value for AuthProtocol. priv_protocol:Privacy Protocol. auth_priv_pp: Pass phrase value for Privacy Protocol. :returns the dictionary of parsed MIBs. :raises exception.InvalidInputError if pysnmp is unable to get SNMP data due to wrong inputs provided. :raises exception.IloError if pysnmp raises any exception. """

    result = {}
    usm_user_obj = _create_usm_user_obj(snmp_credentials)
    try:
        for(errorIndication,
            errorStatus,
            errorIndex,
            varBinds) in hlapi.nextCmd(
                hlapi.SnmpEngine(),
                usm_user_obj,
                hlapi.UdpTransportTarget((iLOIP, 161), timeout=3, retries=3),
                hlapi.ContextData(),
                # cpqida cpqDaPhyDrvTable Drive Array Physical Drive Table
                hlapi.ObjectType(
                    hlapi.ObjectIdentity('1.3.6.1.4.1.232.3.2.5.1')),
                # cpqscsi SCSI Physical Drive Table
                hlapi.ObjectType(
                    hlapi.ObjectIdentity('1.3.6.1.4.1.232.5.2.4.1')),
                # cpqscsi SAS Physical Drive Table
                hlapi.ObjectType(
                    hlapi.ObjectIdentity('1.3.6.1.4.1.232.5.5.2.1')),
                lexicographicMode=False,
                ignoreNonIncreasingOid=True):

            if errorIndication:
                LOG.error(errorIndication)
                msg = "SNMP failed to traverse MIBs %s", errorIndication
                raise exception.IloSNMPInvalidInputFailure(msg)
            else:
                if errorStatus:
                    msg = ('Parsing MIBs failed. %s at %s' % (
                        errorStatus.prettyPrint(),
                        errorIndex and varBinds[-1][int(errorIndex)-1]
                        or '?'
                        )
                    )
                    LOG.error(msg)
                    raise exception.IloSNMPInvalidInputFailure(msg)
                else:
                    for varBindTableRow in varBinds:
                        name, val = tuple(varBindTableRow)
                        oid, label, suffix = (
                            mibViewController.getNodeName(name))
                        key = name.prettyPrint()
                        # Don't traverse outside the tables we requested
                        if not (key.find("SNMPv2-SMI::enterprises.232.3") >= 0
                                or (key.find(
                                    "SNMPv2-SMI::enterprises.232.5") >= 0)):
                            break
                        if key not in result:
                            result[key] = {}
                            result[key][label[-1]] = {}
                        result[key][label[-1]][suffix] = val
    except Exception as e:
        msg = "SNMP library failed with error %s", e
        LOG.error(msg)
        raise exception.IloSNMPExceptionFailure(msg)
    return result