Return ``True`` if ``obj`` contains an arXiv identifier.

    The ``idutils`` library's ``is_arxiv`` function has been
    modified here to work with two regular expressions instead
    of three and adding a check for valid arxiv categories only
542614
def is_arxiv(obj):
    """"""
    arxiv_test = obj.split()
    if not arxiv_test:
        return False

    matched_arxiv = (RE_ARXIV_PRE_2007_CLASS.match(arxiv_test[0]) or
                     RE_ARXIV_POST_2007_CLASS.match(arxiv_test[0]))

    if not matched_arxiv:
        return False

    if not matched_arxiv.group('category'):
        return True

    valid_arxiv_categories_lower = [category.lower() for category in valid_arxiv_categories()]
    category = matched_arxiv.group('category').lower()
    return (category in valid_arxiv_categories_lower or
            category.replace('-', '.') in valid_arxiv_categories_lower)
340906
def is_cython(obj):
    """"""

    # TODO(suo): We could split these into two functions, one for Cython
    # functions and another for Cython methods.
    # TODO(suo): There doesn't appear to be a Cython function 'type' we can
    # check against via isinstance. Please correct me if I'm wrong.
    def check_cython(x):
        return type(x).__name__ == "cython_function_or_method"

    # Check if function or method, respectively
    return check_cython(obj) or \
        (hasattr(obj, "__func__") and check_cython(obj.__func__))
648496
function is(obj, type) {
      if (!type) {
        return obj !== undefined;
      }

      if (type == 'array' && Arr.isArray(obj)) {
        return true;
      }

      return typeof obj == type;
    }
538197
def is_string(obj):
    
    if PYTHON3:
        str_type = (bytes, str)
    else:
        str_type = (bytes, str, unicode)
    return isinstance(obj, str_type)
165775
def is_identifier(string):
    
    matched = PYTHON_IDENTIFIER_RE.match(string)
    return bool(matched) and not keyword.iskeyword(string)
127133
def is_text(obj, name=None):
    
    try:  # python2
        ans = isinstance(obj, basestring)
    except NameError:  # python3
        ans = isinstance(obj, str)
    if name:
        print("is_text: (%s) %s = %s" % (ans, name, obj.__class__),
              file=sys.stderr)
    return ans
380679
function checkInterface(obj, funcs) {
    for (var i = 0; i < funcs.length; ++i) {
        if (typeof obj[funcs[i]] !== 'function')
            return false;
    }
    return true;
}
947234
function isPlainObject(v) {
    return v &&
           typeof v === 'object' &&
           !Array.isArray(v) &&
           !(v instanceof Function) &&
           !(v instanceof RegExp);
  }
1288751
def is_identifier(self, is_identifier):
        

        if is_identifier:
            self.is_editable = False

        self._is_identifier = is_identifier
1346583
function checkIdentifier(str, context) {
    if (!/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(str)) {
        throw new ImplementationError(`Invalid identifier "${str}"${context.errorContext}`);
    }
    return str;
}
864975
def is_numeric(obj):
    
    try:
        obj+obj, obj-obj, obj*obj, obj**obj, obj/obj
    except ZeroDivisionError:
        return True
    except Exception:
        return False
    else:
        return True
31932
def object_exists_in_project(obj_id, proj_id):
    '''
    
    '''
    if obj_id is None:
        raise ValueError("Expected obj_id to be a string")
    if proj_id is None:
        raise ValueError("Expected proj_id to be a string")
    if not is_container_id(proj_id):
        raise ValueError('Expected %r to be a container ID' % (proj_id,))
    return try_call(dxpy.DXHTTPRequest, '/' + obj_id + '/describe', {'project': proj_id})['project'] == proj_id
1225580
def is_indexed(self, identifier):
        
        with self.index.searcher() as searcher:
            result = searcher.search(Term('identifier', identifier['identifier']))
            return bool(result)
49363
def pretty_identifier(self):
        

        ident = self.get_name()
        if self.is_method:
            args = ",".join(self.pretty_arg_types())
            ident = "%s(%s)" % (ident, args)

        return "%s:%s" % (ident, self.pretty_type())
1313873
def isnumber(obj):
    
    return (
        (obj is not None)
        and (not isinstance(obj, bool))
        and isinstance(obj, (int, float, complex))
    )
598845
def does_match_exist(self, inst):
        

        answer = True
        if self._decl_type is not None:
            answer &= isinstance(inst, self._decl_type)
        if self.name is not None:
            answer &= inst.name == self.name
        if self.parent is not None:
            answer &= self.parent is inst.parent
        if self.fullname is not None:
            if inst.name:
                answer &= self.fullname == declaration_utils.full_name(inst)
            else:
                answer = False
        return answer
1238843
def verify_is_instance(self, obj, cls, msg=""):
        
        try:
            self.assert_is_instance(obj, cls, msg)
        except AssertionError, e:
            if msg:
                m = "%s:\n%s" % (msg, str(e))
            else:
                m = str(e)
            self.verification_erorrs.append(m)