Create a node for FileItem/PEInfo/Type
    
    :return: A IndicatorItem represented as an Element node
8350
def make_fileitem_peinfo_type(petype, condition='is', negate=False, preserve_case=False):
    
    document = 'FileItem'
    search = 'FileItem/PEInfo/Type'
    content_type = 'string'
    content = petype
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate, preserve_case=preserve_case)
    return ii_node
498708
def make_dnsentryitem_recordname(dns_name, condition='contains', negate=False, preserve_case=False):
    
    document = 'DnsEntryItem'
    search = 'DnsEntryItem/RecordName'
    content_type = 'string'
    content = dns_name
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate, preserve_case=preserve_case)
    return ii_node
14127
def create(self, path, data=None):
        
        node = self.current[-1]
        path = self._splitpath(path)
        n_items = len(path)
        for n, item in enumerate(path):
            tag, attribs = self._splittag(item)

            # The leaf node is always newly created.
            if n == n_items-1:
                node = node.add(Node(tag, attribs))
                break

            # Parent nodes are only created if they do not exist yet.
            existing = node.get_child(tag, attribs)
            if existing is not None:
                node = existing
            else:
                node = node.add(Node(tag, attribs))
        if data:
            node.text = unquote(data)
        return node
458708
function createNode(src, raw, files, config) {
  var node = new FilesNode(src, raw, config);
  if (node.path || node.src) {
    files.push(node);
  }
}
503520
def make_fileitem_streamlist_stream_name(stream_name, condition='is', negate=False, preserve_case=False):
    
    document = 'FileItem'
    search = 'FileItem/StreamList/Stream/Name'
    content_type = 'string'
    content = stream_name
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate, preserve_case=preserve_case)
    return ii_node
899658
def make_fileitem_fileextension(extension, condition='is', negate=False, preserve_case=False):
    
    document = 'FileItem'
    search = 'FileItem/FileExtension'
    content_type = 'string'
    content = extension
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate, preserve_case=preserve_case)
    return ii_node
1366855
def create_node(kwargs):
    '''
    
    '''
    if not isinstance(kwargs, dict):
        kwargs = {}

    # Required parameters
    params = {
        'Action': 'CreateInstance',
        'InstanceType': kwargs.get('size_id', ''),
        'RegionId': kwargs.get('region_id', DEFAULT_LOCATION),
        'ImageId': kwargs.get('image_id', ''),
        'SecurityGroupId': kwargs.get('securitygroup_id', ''),
        'InstanceName': kwargs.get('name', ''),
    }

    # Optional parameters'
    optional = [
        'InstanceName', 'InternetChargeType',
        'InternetMaxBandwidthIn', 'InternetMaxBandwidthOut',
        'HostName', 'Password', 'SystemDisk.Category', 'VSwitchId'
        # 'DataDisk.n.Size', 'DataDisk.n.Category', 'DataDisk.n.SnapshotId'
    ]

    for item in optional:
        if item in kwargs:
            params.update({item: kwargs[item]})

    # invoke web call
    result = query(params)
    return result['InstanceId']
923676
def make_systemrestoreitem_originalfilename(original_filename, condition='contains', negate=False, preserve_case=False):
    
    document = 'SystemRestoreItem'
    search = 'SystemRestoreItem/OriginalFileName'
    content_type = 'string'
    content = original_filename
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate, preserve_case=preserve_case)
    return ii_node
985767
def make_serviceitem_servicedll(servicedll, condition='contains', negate=False, preserve_case=False):
    
    document = 'ServiceItem'
    search = 'ServiceItem/serviceDLL'
    content_type = 'string'
    content = servicedll
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate, preserve_case=preserve_case)
    return ii_node
1074945
def make_processitem_stringlist_string(string, condition='contains', negate=False, preserve_case=False):
    
    document = 'ProcessItem'
    search = 'ProcessItem/StringList/string'
    content_type = 'string'
    content = string
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate, preserve_case=preserve_case)
    return ii_node
1319017
def make_processitem_handlelist_handle_name(handle_name, condition='contains', negate=False, preserve_case=False):
    
    document = 'ProcessItem'
    search = 'ProcessItem/HandleList/Handle/Name'
    content_type = 'string'
    content = handle_name
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate, preserve_case=preserve_case)
    return ii_node
517409
def File(self, name, directory=None, create=1):
        
        return self._create_node(name, self.env.fs.File, directory, create)
589133
def make_driveritem_deviceitem_devicename(device_name, condition='is', negate=False, preserve_case=False):
    
    document = 'DriverItem'
    search = 'DriverItem/DeviceItem/DeviceName'
    content_type = 'string'
    content = device_name
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate, preserve_case=preserve_case)
    return ii_node
899177
def make_fileitem_peinfo_importedmodules_module_importedfunctions_string(imported_function, condition='is',
                                                                         negate=False, preserve_case=False):
    
    document = 'FileItem'
    search = 'FileItem/PEInfo/ImportedModules/Module/ImportedFunctions/string'
    content_type = 'string'
    content = imported_function
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate, preserve_case=preserve_case)
    return ii_node
1339180
def create_element(cls, type_=None, props=None, *children):
        
        # Create an empty document fragment.
        if not type_:
            return cls.dom.create_tag('fragment')

        if props is None:
            props = {}

        # If the first element of children is a list, we use it as the list.
        if len(children) and isinstance(children[0], (list, tuple)):
            children = children[0]

        # The children prop is the first child if there is only one.
        props['children'] = children[0] if len(children) == 1 else children

        if callable(type_):
            # Function component, via def or lambda.
            elt = type_(props)
        else:
            # Raw tag, as a string.
            attributes = {}

            # Never render those attributes on a raw tag.
            props.pop('children', None)
            props.pop('block', None)
            props.pop('blocks', None)
            props.pop('entity', None)
            props.pop('inline_style_range', None)

            # Convert style object to style string, like the DOM would do.
            if 'style' in props and isinstance(props['style'], dict):
                rules = ['{0}: {1};'.format(DOM.camel_to_dash(s), props['style'][s]) for s in props['style'].keys()]
                props['style'] = ''.join(sorted(rules))

            # Convert props to HTML attributes.
            for key in props:
                if props[key] is False:
                    props[key] = 'false'

                if props[key] is True:
                    props[key] = 'true'

                if props[key] is not None:
                    attributes[key] = unicode(props[key])

            elt = cls.dom.create_tag(type_, attributes)

            # Append the children inside the element.
            for child in children:
                if child not in (None, ''):
                    cls.append_child(elt, child)

        # If elt is "empty", create a fragment anyway to add children.
        if elt in (None, ''):
            elt = cls.dom.create_tag('fragment')

        return elt
632813
private Node createTemplateNode() {
    // The Node type choice is arbitrary.
    Node templateNode = new Node(Token.SCRIPT);
    templateNode.setStaticSourceFile(sourceFile);
    return templateNode;
  }
241595
def to_etree(self):
        
        layers_attrib_val = ' '.join('//@layers.{}'.format(layer_id)
                                     for layer_id in self.layers)

        attribs = {
            '{{{pre}}}type'.format(pre=NAMESPACES['xsi']): self.xsi_type,
            'layers': layers_attrib_val}

        E = ElementMaker()
        node = E('nodes', attribs)
        label_elements = (label.to_etree() for label in self.labels)
        node.extend(label_elements)
        return node