def check_custom_concurrency(default, forced, logger=None):
logger = logger or LOGGER<EOL>cmc_msg = '<STR_LIT>'<EOL>if not isinstance(forced, int):<EOL><INDENT>logger.warn(cmc_msg + '<STR_LIT>')<EOL><DEDENT>elif forced > default:<EOL><INDENT>msg = '<STR_LIT>' % default<EOL>logger.warn(cmc_msg + msg)<EOL><DEDENT>elif forced < <NUM_LIT:1>:<EOL><INDENT>msg = '<STR_LIT>'<EOL>logger.warn(cmc_msg + msg)<EOL><DEDENT>else:<EOL><INDENT>default = forced<EOL><DEDENT>return default<EOL>
Get the proper concurrency value according to the default one
    and the one specified by the crawler.

    :param int default:
      default tasks concurrency

    :param forced:
      concurrency asked by crawler

    :return:
      concurrency to use.
    :rtype: int