'Filters (if `neg` == True, filters out) one or more
particular AS number(s).'

@staticmethod
def searchasnum(asnum, neg=False):

    if ((not isinstance(asnum, basestring)) and hasattr(asnum, '__iter__')):
        return {'infos.as_num': {('$nin' if neg else '$in'): [int(val) for val in asnum]}}
    asnum = int(asnum)
    return {'infos.as_num': ({'$ne': asnum} if neg else asnum)}
