Return True if list contains either values of type `vtype` or None.
195961
def is_nullable_list(val, vtype):
    """"""
    return (isinstance(val, list) and
            any(isinstance(v, vtype) for v in val) and
            all((isinstance(v, vtype) or v is None) for v in val))
411630
def is_list_of_list(item):
    
    if (
        type(item) in (list, tuple)
        and len(item)
        and isinstance(item[0], (list, tuple))
    ):
        return True
    return False
655703
def _filter_types(types_dict):
    # type: (Dict[FunctionKey, T]) -> Dict[FunctionKey, T]
    """"""

    def exclude(k):
        # type: (FunctionKey) -> bool
        """Exclude filter"""
        return k.path.startswith('<') or k.func_name == '<module>'

    return {k: v for k, v in iteritems(types_dict) if not exclude(k)}
550564
def isuncertainties(arg_list):
    
    for arg in arg_list:
        if isinstance(arg, (list, tuple)) and isinstance(arg[0], uct.UFloat):
            return True
        elif isinstance(arg, np.ndarray) and isinstance(
                np.atleast_1d(arg)[0], uct.UFloat):
            return True
        elif isinstance(arg, (float, uct.UFloat)) and \
                isinstance(arg, uct.UFloat):
            return True
    return False
810640
function isType(type, val) {
  if (Struct.typeChecker[type]) {
    return Struct.typeChecker[type](val);
  }
  return false;
}
310903
def check_type(self):
        """"""
        self.isdiscrete = {}
        for stochastic in self.stochastics:
            if stochastic.dtype in integer_dtypes:
                self.isdiscrete[stochastic] = True
            elif stochastic.dtype in bool_dtypes:
                raise ValueError(
                    'Binary stochastics not supported by AdaptativeMetropolis.')
            else:
                self.isdiscrete[stochastic] = False
865448
def check_is_a_sequence(var, allow_none=False):
    
    if not is_a_sequence(var, allow_none=allow_none):
        raise TypeError("var must be a list or tuple, however type(var) is {}"
                        .format(type(var)))
633426
def _is_valid_options_weights_list(value):
    ''''''
    return ((isinstance(value, list)) and
            len(value) > 1 and
            (all(isinstance(opt, tuple) and
                 len(opt) == 2 and
                 isinstance(opt[1], (int, float))
                 for opt in value)))
896784
def _has_data(self):
        """"""
        return any([
            len([
                v for a in (s[0] if is_list_like(s) else [s])
                for v in (a if is_list_like(a) else [a]) if v is not None
            ]) for s in self.raw_series
        ])
767269
def any(self, axis=0, *args, **kwargs):
        
        nv.validate_any(args, kwargs)

        values = self.sp_values

        if len(values) != len(self) and np.any(self.fill_value):
            return True

        return values.any().item()
628884
def hasChannelType(self, chan):
        
        if self._chantypes is None:
            self._initChannelTypesList()
        return chan in self._chantypes
1306790
def is_iterable_of_float(l):
     """
    if not is_iterable(l):
        return False

    return all(is_float(value) for value in l)
694549
def _has_instance(data, dtype):
    """"""
    for item in data:
        _, arr = item
        if isinstance(arr, dtype):
            return True
    return False
529770
def has_dtypes(df, items):
    
    dtypes = df.dtypes
    for k, v in items.items():
        if not dtypes[k] == v:
            raise AssertionError("{} has the wrong dtype. Should be ({}), is ({})".format(k, v,dtypes[k]))
    return df
530274
public boolean hasNamedPolicy(String ptype, List<String> params) {
        return model.hasPolicy("p", ptype, params);
    }
1089493
def has_any():
    ""
    return get_first(has_ctypes_iocp, has_iocp, has_stdlib_kqueue, has_kqueue, 
                        has_stdlib_epoll, has_epoll, has_poll, has_select)
138724
def listify(x, none_value=[]):
    """"""

    if isinstance(x, list):
        return x
    elif isinstance(x, tuple):
        return list(x)
    elif x is None:
        return none_value
    else:
        return [x]