def extract_cert_check(key, device, not_secret):
    """
    Check function for extracting PTCRB info.

    :param key: Device entry.
    :type key: dict

    :param device: HWID, FCCID or name of device.
    :type device: str

    :param not_secret: If device is not market as secret.
    :type not_secret: bool
    """
    keylist = key['hwid'], key['fccid'], key['ptcrbid']
    goforit = (device in keylist or not_secret) and key['ptcrbid']
    return goforit