<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def structure_lines(self, structure, cell_flg=True, frac_flg=True, anion_shell_flg=True, cation_shell_flg=False, symm_flg=True):
 """ Generates GULP input string corresponding to pymatgen structure. Args: structure: pymatgen Structure object cell_flg (default = True):
 Option to use lattice parameters. fractional_flg (default = True):
 If True, fractional coordinates are used. Else, cartesian coodinates in Angstroms are used. ****** GULP convention is to use fractional coordinates for periodic structures and cartesian coordinates for non-periodic structures. ****** anion_shell_flg (default = True):
 If True, anions are considered polarizable. cation_shell_flg (default = False):
 If True, cations are considered polarizable. symm_flg (default = True):
 If True, symmetry information is also written. Returns: string containing structure for GULP input """

        gin = ""
        if cell_flg:
            gin += "cell\n"
            l = structure.lattice
            lat_str = [str(i) for i in [l.a, l.b, l.c, l.alpha, l.beta,
                                        l.gamma]]
            gin += " ".join(lat_str) + "\n"

        if frac_flg:
            gin += "frac\n"
            coord_attr = "frac_coords"
        else:
            gin += "cart\n"
            coord_attr = "coords"
        for site in structure.sites:
            coord = [str(i) for i in getattr(site, coord_attr)]
            specie = site.specie
            core_site_desc = specie.symbol + " core " + " ".join(coord) + "\n"
            gin += core_site_desc
            if ((specie in _anions and anion_shell_flg) or
                    (specie in _cations and cation_shell_flg)):
                shel_site_desc = specie.symbol + " shel " + " ".join(
                    coord) + "\n"
                gin += shel_site_desc
            else:
                pass

        if symm_flg:
            gin += "space\n"
            gin += str(SpacegroupAnalyzer(structure).get_space_group_number()) + "\n"
        return gin