code: def lte2json(self, filename):
          
          lpins = lattice.LteParser(filename)
          data_json = lpins.file2json()
  
          latins = lattice.Lattice(lpins.file2json())
          self.lattice_instance = latins
          self.all_beamlines = latins.getAllBl()
          if self.use_beamline is None:
              self.use_beamline = 'BL' if 'BL' in self.all_beamlines else self.all_beamlines[
                  0]
          bl_ele_list = [latins.getFullBeamline(k, True)
                         for k in self.all_beamlines]
          self.beamlines_dict = dict(zip(self.all_beamlines, bl_ele_list))
  
          data_lte = open(filename, 'r').read()
          return data_json, data_lte
docs: convert lte to json
  
              return tuple of json, lte file content