Determine whether type "t" is a FHIR primitive type
        :param t: type to test
        :return:
15297
def is_primitive(self, t: URIRef) -> bool:
        
        return FHIR.Primitive in self._o.objects(t, RDFS.subClassOf)
820418
def is_enum_type(type_):
    

    return isinstance(type_, type) and issubclass(type_, tuple(_get_types(Types.ENUM)))
885269
def is_tuple(type_: Type[Any]) -> bool:
    '''
    
    '''
    if HAS_TUPLEARGS:
        # The tuple, Tuple thing is a difference between 3.6 and 3.7
        # In 3.6 and before, Tuple had an __extra__ field, while Tuple[something]
        # would have the normal __origin__ field.
        #
        # Those apply for Dict, List, Set, Tuple
        return _generic_type_check(type_, tuple, Tuple)
    else:
        # Old python
        return _issubclass(type_, Tuple) and _issubclass(type_, tuple) == False
385617
private boolean areTypesAssignable(Class<?> source, Class<?> target)
   {
      if (target.isAssignableFrom(source))
      {
         return true;
      }
      else if (!source.isPrimitive() && !target.isPrimitive())
      {
         return false;
      }
      else if (source.isPrimitive())
      {
         // source is primitive
         return primitiveToWrapperMap.get(source) == target;
      }
      else
      {
         // target is primitive
         return source == primitiveToWrapperMap.get(target);
      }
   }
62744
public boolean isConvertible(Type t, Type s, Warner warn) {
        if (t.hasTag(ERROR)) {
            return true;
        }
        boolean tPrimitive = t.isPrimitive();
        boolean sPrimitive = s.isPrimitive();
        if (tPrimitive == sPrimitive) {
            return isSubtypeUnchecked(t, s, warn);
        }
        if (!allowBoxing) return false;
        return tPrimitive
            ? isSubtype(boxedClass(t).type, s)
            : isSubtype(unboxedType(t), s);
    }
396657
def get_primitive_type(stmt):
    
    type_obj = stmt.search_one('type')
    type_name = getattr(type_obj, 'arg', None)
    typedef_obj = getattr(type_obj, 'i_typedef', None)
    if typedef_obj:
        type_name = get_primitive_type(typedef_obj)
    elif type_obj and not check_primitive_type(type_obj):
        raise Exception('%s is not a primitive! Incomplete parse tree?' %
                        type_name)
    return type_name
666355
def primitive_datatype_nostring(self, t: URIRef, v: Optional[str] = None) -> Optional[URIRef]:
        
        vt = self.primitive_datatype(t)
        if self.fhir_dates and vt == XSD.dateTime and v:
            return XSD.gYear if len(v) == 4 else XSD.gYearMonth if len(v) == 7 \
                else XSD.date if (len(v) == 10 or (len(v) > 10 and v[10] in '+-')) else XSD.dateTime
        # For some reason the oid datatype is represented as a string as well
        if self.fhir_oids and vt == XSD.anyURI:
            vt = None
        return None if vt == XSD.string else vt
996385
def is_metatype(rdtype):
    """"""

    if rdtype >= TKEY and rdtype <= ANY or rdtype in _metatypes:
        return True
    return False
763731
def t_IDENTIFIER(t):
  "
  if t.value in keywords:
    t.type = t.value
  return t
1019147
def TYPE(type_):
        
        if isinstance(type_, symbols.TYPE):
            return type_

        assert TYPE.is_valid(type_)
        return gl.SYMBOL_TABLE.basic_types[type_]
871355
def is_isomorphic(s, t):
    
    if len(s) != len(t):
        return False
    dict = {}
    set_value = set()
    for i in range(len(s)):
        if s[i] not in dict:
            if t[i] in set_value:
                return False
            dict[s[i]] = t[i]
            set_value.add(t[i])
        else:
            if dict[s[i]] != t[i]:
                return False
    return True
711609
private void checkForOfTypes(NodeTraversal t, Node forOf) {
    Node lhs = forOf.getFirstChild();
    Node iterable = forOf.getSecondChild();
    JSType iterableType = getJSType(iterable);
    JSType actualType;

    if (forOf.isForAwaitOf()) {
      Optional<JSType> maybeType =
          validator.expectAutoboxesToIterableOrAsyncIterable(
              iterable,
              iterableType,
              "Can only async iterate over a (non-null) Iterable or AsyncIterable type");

      if (!maybeType.isPresent()) {
        // Not iterable or async iterable, error reported by
        // expectAutoboxesToIterableOrAsyncIterable.
        return;
      }

      actualType = maybeType.get();
    } else {
      validator.expectAutoboxesToIterable(
          iterable, iterableType, "Can only iterate over a (non-null) Iterable type");

      actualType =
          // Convert primitives to their wrapper type and remove null/undefined
          // If iterable is a union type, autoboxes each member of the union.
          iterableType
              .autobox()
              .getTemplateTypeMap()
              .getResolvedTemplateType(typeRegistry.getIterableTemplate());
    }

    if (NodeUtil.isNameDeclaration(lhs)) {
      // e.g. get "x" given the VAR in "for (var x of arr) {"
      lhs = lhs.getFirstChild();
    }
    if (lhs.isDestructuringLhs()) {
      // e.g. get `[x, y]` given the VAR in `for (var [x, y] of arr) {`
      lhs = lhs.getFirstChild();
    }

    checkCanAssignToWithScope(
        t,
        forOf,
        lhs,
        actualType,
        lhs.getJSDocInfo(),
        "declared type of for-of loop variable does not match inferred type");
  }
148624
def is_base_tuple(type_str):
    
    try:
        abi_type = grammar.parse(type_str)
    except exceptions.ParseError:
        return False

    return isinstance(abi_type, grammar.TupleType) and abi_type.arrlist is None
681729
public static boolean isPrimitiveLike(Type t)
  {
    if(isNumber(t)) {
      return true;
    }
    if(isBoolean(t)) {
      return true;
    }
    if(isEnum(t)) {
      return true;
    }
    if(isCharacter(t)) {
      return true;
    }
    if(isDate(t)) {
      return true;
    }
    if(t == String.class) {
      return true;
    }
    return false;
  }
1311264
public static boolean isURIRDFType(Term term) {
        if (term instanceof Function) {
            Function func = (Function) term;
            if (func.getArity() == 1 && (func.getFunctionSymbol() instanceof URITemplatePredicate)) {
                Term t0 = func.getTerm(0);
                if (t0 instanceof IRIConstant)
                    return ((IRIConstant) t0).getIRI().equals(RDF.TYPE);
                // UGLY!! TODO: remove it
                else if (t0 instanceof ValueConstant)
                    return ((ValueConstant) t0).getValue().equals(RDF.TYPE.getIRIString());
            }
        }
        return false;
    }
728373
def dtype_for(t):
    
    if t in dtype_dict:
        return dtype_dict[t]
    return np.typeDict.get(t, t)
1310157
def p_jointype(self,t):
    
    if len(t) <= 2 or t[1] == 'inner': t[0] = JoinTypeX(None, False, None)
    else: t[0] = JoinTypeX(t[1], True, None)