lmap.is_lazy(k) yields True if the given k is lazy and unmemoized in the given lazy map,
        lmap, otherwise False.
168914
def is_lazy(self, k):
        '''
        
        '''
        v = ps.PMap.__getitem__(self, k)
        if not isinstance(v, (types.FunctionType, partial)) or \
           id(v) in self._memoized or \
           [] != getargspec_py27like(v)[0]:
            return False
        else:
            return True
1129014
public static <K,V> Map<K,V> asImmutable(Map<? extends K, ? extends V> self) {
        return Collections.unmodifiableMap(self);
    }
1285399
private static <K,V> void combineMaps(Map<K,V> m1, Map<K,V> m2)
    {
    	for (Map.Entry<K,V> me : m2.entrySet()) {
            K key = me.getKey();
            /* Int. subset has precedence, but let's guess most of
             * the time there are no collisions:
             */
            V old = m1.put(key, me.getValue());
            // Oops, got value! Let's put it back
            if (old != null) {
                m1.put(key, old);
            }
        }
    }
996755
function( map ){
      var empty = true;

      if( map != null ){
        for(var i in map){
          empty = false;
          break;
        }
      }

      return empty;
    }
835859
private static boolean isMaybeRecursive(final Object o) {
        return o.getClass().isArray() || o instanceof Map || o instanceof Collection;
    }
744088
@Override
    public boolean containsKey(final Object arg0)
    {
        eagerlyLoadDataCollection();
        final Map dataMap = (Map) dataCollection;

        boolean result = false;

        if (dataMap != null && !(dataMap instanceof ProxyMap) && !dataMap.isEmpty())
        {
            result = dataMap.containsKey(arg0);
        }
        return result;
    }
628474
def is_memoized(self, k):
        '''
        
        '''
        v = ps.PMap.__getitem__(self, k)
        if not isinstance(v, (types.FunctionType, partial)):
            return False
        else:
            return id(v) in self._memoized
1209411
public static <K, V> Map<K, V> toImmutableMap(final Map<K, V> map) {
    switch (map.size()) {
      case 0:
        return Collections.emptyMap();
      case 1:
        final Entry<K, V> entry = map.entrySet().iterator().next();
        return Collections.singletonMap(entry.getKey(), entry.getValue());
      default:
        return Collections.unmodifiableMap(map);
    }
  }
815515
def check_lazy_load_wegsegment(f):
    '''
    
    '''
    def wrapper(*args):
        wegsegment = args[0]
        if (
            wegsegment._methode_id is None or
            wegsegment._geometrie is None or
            wegsegment._metadata is None
        ):
            log.debug('Lazy loading Wegsegment %d', wegsegment.id)
            wegsegment.check_gateway()
            w = wegsegment.gateway.get_wegsegment_by_id(wegsegment.id)
            wegsegment._methode_id = w._methode_id
            wegsegment._geometrie = w._geometrie
            wegsegment._metadata = w._metadata
        return f(*args)
    return wrapper
1164335
public void hasLastKey(@NullableDecl Object key) {
    if (actualAsNavigableMap().isEmpty()) {
      failWithActual("expected to have last key", key);
      return;
    }

    if (!Objects.equal(actualAsNavigableMap().lastKey(), key)) {
      if (actualAsNavigableMap().containsKey(key)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s has last key <%s>. "
                        + "It does contain this key, but the last key is <%s>",
                    actualAsString(), key, actualAsNavigableMap().lastKey())));
        return;
      }
      failWithoutActual(
          simpleFact(
              lenientFormat(
                  "Not true that %s has last key <%s>. "
                      + "It does not contain this key, and the last key is <%s>",
                  actualAsString(), key, actualAsNavigableMap().lastKey())));
    }
  }
184873
public static final <K,V> MapSet<K,V> unmodifiableMapSet(MapSet<K,V> set)
    {
        return new UnmodifiableMapSet(set);
    }
1146509
public static <K, V, A> A ifPresentApply(
            Map<K, V> map,
            K key,
            Function<? super V, ? extends A> function)
    {
        if (map instanceof UnsortedMapIterable)
        {
            return ((MapIterable<K, V>) map).ifPresentApply(key, function);
        }
        V result = map.get(key);
        return MapIterate.isAbsent(result, map, key) ? null : function.valueOf(result);
    }
954343
public boolean isReverseIterationSupported() {
        return mNaturalClass.isArray() ||
            List.class.isAssignableFrom(mNaturalClass) ||
            Set.class.isAssignableFrom(mNaturalClass) ||
            Map.class.isAssignableFrom(mNaturalClass) ;
    }
1040666
protected void lazyor(final ImmutableRoaringBitmap x2) {
    int pos1 = 0, pos2 = 0;
    int length1 = highLowContainer.size();
    final int length2 = x2.highLowContainer.size();
    main: if (pos1 < length1 && pos2 < length2) {
      short s1 = highLowContainer.getKeyAtIndex(pos1);
      short s2 = x2.highLowContainer.getKeyAtIndex(pos2);

      while (true) {
        if (s1 == s2) {
          getMappeableRoaringArray().setContainerAtIndex(pos1, highLowContainer
              .getContainerAtIndex(pos1).lazyIOR(x2.highLowContainer.getContainerAtIndex(pos2)));
          pos1++;
          pos2++;
          if ((pos1 == length1) || (pos2 == length2)) {
            break main;
          }
          s1 = highLowContainer.getKeyAtIndex(pos1);
          s2 = x2.highLowContainer.getKeyAtIndex(pos2);
        } else if (Util.compareUnsigned(s1, s2) < 0) { // s1 < s2
          pos1++;
          if (pos1 == length1) {
            break main;
          }
          s1 = highLowContainer.getKeyAtIndex(pos1);
        } else { // s1 > s2
          getMappeableRoaringArray().insertNewKeyValueAt(pos1, s2,
              x2.highLowContainer.getContainerAtIndex(pos2).clone());
          pos1++;
          length1++;
          pos2++;
          if (pos2 == length2) {
            break main;
          }
          s2 = x2.highLowContainer.getKeyAtIndex(pos2);
        }
      }
    }
    if (pos1 == length1) {
      getMappeableRoaringArray().appendCopy(x2.highLowContainer, pos2, length2);
    }
  }
1107474
@Override
    public <R2> Lazy<Either<L, R2>> lazyZip(
            Lazy<? extends Applicative<Function<? super R, ? extends R2>, Either<L, ?>>> lazyAppFn) {
        return match(l -> lazy(left(l)),
                     r -> lazyAppFn.fmap(eitherLF -> eitherLF.<R2>fmap(f -> f.apply(r)).coerce()));
    }
303089
function lazyVisit(node, f, k) {
    switch (node.type) {
        case LEAF:
            return {
                value: f(node),
                rest: k
            };

        case COLLISION:
        case ARRAY:
        case INDEX:
            var children = node.children;
            return lazyVisitChildren(children.length, children, 0, f, k);

        default:
            return appk(k);
    }
}
585156
def is_dynamic_overlay(dmap):
    
    if not isinstance(dmap, DynamicMap):
        return False
    elif dmap.callback._is_overlay:
        return True
    else:
        return any(is_dynamic_overlay(dm) for dm in dmap.callback.inputs)