def __init__(self, max_resources, factory):
        if max_resources < 1:
            raise ValueError(
                'max_resources should be at least 1, got {}'.format(
                    max_resources))
        self._factory = factory

        # pychecker makes us do this, it won't recognise that
        # multiprocessing.queues is a thing.
        mp = multiprocessing
        self._free_resources = mp.queues.SimpleQueue()
        for _ in xrange(max_resources):
            self._free_resources.put(_NotAResource)
Handles imports for the specified element.
dataset/ETHPy150Open bloomberg/phabricator-tools/py/phl/phlsys_multiprocessing.py/MultiResource.__init__--crossover with--dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/java_generator.py/Java14Generator._HandleJsonString