def brain_check(speed, salts):
    """
    Method to decide whether or not to enable the brain

    Arguments
    ---------
    speed: int
        estimated speed, taken from speed_check()
    salts: int
        number of salts in hashcat session
    Returns
    -------
    brain: boolean
        enable or disable
    """
    logger.debug('Running brain check')
    logger.debug('Salts Count: {}'.format(salts))
    logger.debug('Relative estimated speed: {}'.format(speed))
    if salts > 0:
        if speed / salts < 500000:
            logger.debug('Brain engaged!')
            brain = True
        else:
            brain = False
            logger.debug('Brain disabled due to bottleneck (fast candidates)')
    else:
        if speed < 500000:
            logger.debug('Brain engaged!')
            brain = True
        else:
            brain = False
            logger.debug('Brain disabled due to bottleneck (fast candidates)')
    return brain

    Method to decide whether or not to enable the brain

    Arguments
    ---------
    speed: int
        estimated speed, taken from speed_check()
    salts: int
        number of salts in hashcat session
    Returns
    -------
    brain: boolean
        enable or disable
    
crackq/run_hashcat.py