<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def addElement(self, *ele):
 """ add element to lattice element list :param ele: magnetic element defined in element module return total element number """

        for el in list(Models.flatten(ele)):
            e = copy.deepcopy(el)
            self._lattice_eleobjlist.append(e)
            self._lattice_elenamelist.append(e.name)
            self._lattice_elecnt += 1
        # update lattice, i.e. beamline element

        # self._lattice.setConf(Models.makeLatticeString(self._lattice_elenamelist))
        self._lattice.setConf(Models.makeLatticeDict(self._lattice_elenamelist))

        # positioning elements
        self.initPos()

        return self._lattice_elecnt