code: def limit_inference(iterator, size):
      
      yield from islice(iterator, size)
      has_more = next(iterator, False)
      if has_more is not False:
          yield Uninferable
          return
docs: Limit inference amount.
  
      Limit inference amount to help with performance issues with
      exponentially exploding possible results.
  
      :param iterator: Inference generator to limit
      :type iterator: Iterator(NodeNG)
  
      :param size: Maximum mount of nodes yielded plus an
          Uninferable at the end if limit reached
      :type size: int
  
      :yields: A possibly modified generator
      :rtype param: Iterable