Creates a body element with attributes specified by @**kwargs.

    Args:
        name (str): body name.
        pos: 3d position of the body frame.
771372
def new_body(name=None, pos=None, **kwargs):
    
    if name is not None:
        kwargs["name"] = name
    if pos is not None:
        kwargs["pos"] = array_to_string(pos)
    element = ET.Element("body", attrib=kwargs)
    return element
1310916
def add_attribute(self, name, value):
        

        self.attributes.append(Attribute(name, value))
1018105
def get_body(name):
    

    try:

        body, propag = _bodies[name.lower()]
        # attach a propagator to the object
        body.propagate = propag.propagate
    except KeyError as e:
        raise UnknownBodyError(e.args[0])

    return body
760065
def get_body_arguments(self, name: str, strip: bool = True) -> List[str]:
        
        return self._get_arguments(name, self.request.body_arguments, strip)
1341735
def insert_element(self, vector, value, idx, name=''):
        
        instr = instructions.InsertElement(self.block, vector, value, idx,
                                           name=name)
        self._insert(instr)
        return instr
547871
protected void initBodyElementName(String elementName) {

        if ((elementName == null)
            || (m_page.hasValue(elementName, getElementLocale())
                && !m_page.isEnabled(elementName, getElementLocale()))) {
            // elementName not specified or given element is disabled, determine default element
            List<String> allElements = m_page.getNames(getElementLocale());
            int elementCount = allElements.size();
            List<String> elements = new ArrayList<String>(elementCount);
            for (int i = 0; i < elementCount; i++) {
                // filter disabled elements
                if (m_page.isEnabled(allElements.get(i), getElementLocale())) {
                    elements.add(allElements.get(i));
                }
            }

            // get the active page elements
            List<CmsDialogElement> elementList = getElementList();
            for (int i = 0; i < elementList.size(); i++) {
                CmsDialogElement checkElement = elementList.get(i);
                if (elements.contains(checkElement.getName())) {
                    // get the first active element from the element list
                    setParamElementname(checkElement.getName());
                    return;
                }
            }

            // no matching active element found
            if (elements.contains(CmsDefaultPageEditor.XML_BODY_ELEMENT)) {
                // default legacy element present, use it
                setParamElementname(CmsDefaultPageEditor.XML_BODY_ELEMENT);
            } else {
                // use the first element from the element list
                setParamElementname(elements.get(0));
            }
        } else {
            // elementName specified and element is enabled or not present, set to elementName
            setParamElementname(elementName);
        }
    }
111736
def create_body(action, params):
        """"""
        body = {}
        body['action'] = action
        if params is not None:
            body['params'] = params
        return body
1333783
def new_graphicFrame(cls, id_, name, x, y, cx, cy):
        
        xml = cls._graphicFrame_tmpl() % (id_, name, x, y, cx, cy)
        graphicFrame = parse_xml(xml)
        return graphicFrame
1206443
def fromProfileName(cls, name):
        
        session = bones.SessionAPI.fromProfileName(name)
        return cls(session)
1146133
def _required_attribute(element, name, default):
    
    if element.get(name) is None:
        element.set(name, default)
848998
def _create_body(self, name, img=None, cont=None, img_format=None,
            img_name=None):
        
        img = utils.get_id(img)
        cont = utils.get_name(cont)
        body = {"type": name}
        if name == "export":
            body["input"] = {
                    "image_uuid": img,
                    "receiving_swift_container": cont}
        else:
            nm = "%s/%s" % (cont, utils.get_name(img))
            body["input"] = {
                    "image_properties": {"name": img_name or img},
                    "import_from": nm,
                    "import_from_format": img_format or DEFAULT_FORMAT}
        return body
825785
def add_point(self, name, value, **attrs):
        
        return Points(self.requester).create(self.id, name, value, **attrs)
1327091
def create_item(self, name):
        
        elem = self.controlled_list.create_item(name)
        if elem:
            return TodoElementUX(parent=self, controlled_element=elem)
1359457
def new_pos(self, html_div):
        """"""
        pos = self.Position(self, html_div)
        pos.bind_mov()
        self.positions.append(pos)
        return pos
1041410
def create_new(self, body):
        
        return self.client.post(self._url(), data=body)
396934
def create_tag(self, name):
        
        return self._tag(self.request('/v2/tags', method='POST', data={
            "name": name,
        })["tag"])
1262926
def attributes(self, *args, **kwargs):
        
        self._element.set_attributes(*args, **kwargs)
        return self