code: def formatElement(self, kw, format='elegant'):
          
          etype = self.getElementType(kw)
          econf_dict = self.getElementConf(kw)
          econf_str = ''
          for k, v in econf_dict.items():
              econf_str += (k + ' = ' + '"' + str(v) + '"' + ', ')
  
          if format == 'elegant':
              fmtstring = '{eid:<10s}:{etype:>10s}, {econf}'.format(eid=kw.upper(),
                                                                    etype=etype.upper(),
                                                                    econf=econf_str[
                                                                          :-2])
              # [:-2] slicing to remove trailing space and ','
          elif format == 'mad':
              raise NotImplementedError("Not implemented, yet")
  
          return fmtstring
docs: convert json/dict of element configuration into elegant/mad format
          :param kw: keyword