<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_pmg_structure(phonopy_structure):
 """ Convert a PhonopyAtoms object to pymatgen Structure object. Args: phonopy_structure (PhonopyAtoms):
 A phonopy structure object. """


    lattice = phonopy_structure.get_cell()
    frac_coords = phonopy_structure.get_scaled_positions()
    symbols = phonopy_structure.get_chemical_symbols()
    masses = phonopy_structure.get_masses()
    mms = phonopy_structure.get_magnetic_moments()
    mms = mms or [0] * len(symbols)

    return Structure(lattice, symbols, frac_coords,
                     site_properties={"phonopy_masses": masses,
                                      "magnetic_moments": mms})