Determine whether element conforms to etype

    :param element: Element to test for conformance
    :param etype: Type to test against
    :param namespace: Namespace to use to resolve forward references
    :return:
550961
def conforms(element, etype, namespace: Dict[str, Any]) -> bool:
    
    etype = proc_forward(etype, namespace)
    if is_union(etype):
        return union_conforms(element, etype, namespace, conforms)
    else:
        return element_conforms(element, etype)
813477
def contains(self, element):
        
        self._run(unittest_case.assertIn, (element, self._subject))
        return ChainInspector(self._subject)
163235
def interpret_element(element_type: str, text: str, span: str) -> Element:
    
    return Element(element_type,
                   interpret_span(span),
                   text)
1074866
function isIndependentType(node) {
            switch (node.kind) {
                case 117 /* AnyKeyword */:
                case 132 /* StringKeyword */:
                case 130 /* NumberKeyword */:
                case 120 /* BooleanKeyword */:
                case 133 /* SymbolKeyword */:
                case 103 /* VoidKeyword */:
                case 135 /* UndefinedKeyword */:
                case 93 /* NullKeyword */:
                case 127 /* NeverKeyword */:
                case 166 /* LiteralType */:
                    return true;
                case 160 /* ArrayType */:
                    return isIndependentType(node.elementType);
                case 155 /* TypeReference */:
                    return isIndependentTypeReference(node);
            }
            return false;
        }
402231
private boolean allTypesExist(Collection<? extends Element> elements) {
    for (Element element : elements) {
      if (element.asType().getKind() == TypeKind.ERROR) {
        return false;
      }
    }
    return true;
  }
927726
def _check_typecode_list(ofwhat, tcname):
    ''''''
    for o in ofwhat:
        if callable(o): #skip if _Mirage
            continue
        if not isinstance(o, TypeCode):
            raise TypeError(
                tcname + ' ofwhat outside the TypeCode hierarchy, ' +
                str(o.__class__))
        if o.pname is None and not isinstance(o, AnyElement):
            raise TypeError(tcname + ' element ' + str(o) + ' has no name')
597494
def find_element(self, name, type=ElementType.ANY):
        

        for e in self.e_list:
            # if a type is specified and this isn't it, move to the next loop.
            if type.value and not e['elementType'] == type:
                continue
            if e["name"] == name:
                uri = self.uri
                uri.eid = e["id"]
                return uri
154115
static boolean isSingletonAdapter(
      Elements elements, Types types, TypeElement element, TypeMirror adaptedType) {
    TypeElement typeAdapterElement = elements.getTypeElement(TYPE_ADAPTER_CLASS_NAME);
    DeclaredType typeAdapterType = types.getDeclaredType(typeAdapterElement, adaptedType);
    return isSingleton(types, element, typeAdapterType);
  }
1316369
protected boolean hasStereotype(Element element, Class<? extends Annotation> stereotype) {
        return hasStereotype(element, stereotype.getName());
    }
661757
def get_applicable_declarations(element, declarations):
    
    element_tag = element.tag
    element_id = element.get('id', None)
    element_classes = element.get('class', '').split()

    return [dec for dec in declarations
            if dec.selector.matches(element_tag, element_id, element_classes)]
1066414
def isObservableElement(self, elementName):
        
        if not(isinstance(elementName, str)):
            raise TypeError(
                "Element name should be a string ." +
                "I receive this {0}"
                .format(elementName))

        return (True if (elementName == "*")
                else self._evaluateString(elementName))
237670
def element_for_attribute(name, namespace='')
      val = instance_values[name]
      return "" if val == nil
      "<%s:%s val='%s'/>" % [namespace, Axlsx::camel(name, false), val]
    end
1206643
def _xml_namespace_strip(root):
    # type: (ET.Element) -> None
    """"""
    if '}' not in root.tag:
        return  # Nothing to do, no namespace present

    for element in root.iter():
        if '}' in element.tag:
            element.tag = element.tag.split('}')[1]
        else:  # pragma: no cover
            # We should never get here. If there is a namespace, then the namespace should be
            # included in all elements.
            pass
227959
def element_type(self):
        
        result = conf.lib.clang_getElementType(self)
        if result.kind == TypeKind.INVALID:
            raise Exception('Element type not available on this type.')

        return result
1300074
def _element_find_from_root(
        root,  # type: ET.Element
        element_path  # type: Text
):
    # type: (...) -> Optional[ET.Element]
    
    element = None

    element_names = element_path.split('/')
    if element_names[0] == root.tag:
        if len(element_names) > 1:
            element = root.find('/'.join(element_names[1:]))
        else:
            element = root

    return element
1331627
def get_element_type(_list, dimens):
    
    elem = _list
    for _ in range(len(dimens)):
        elem = elem[0]
    return type(elem)
418910
def type
      assert_exists
      value = @element.get_attribute("type").to_s

      # we return 'text' if the type is invalid
      # not sure if we really should do this
      TextFieldLocator::NON_TEXT_TYPES.include?(value) ? value : 'text'
    end