def METHOD_NAME(get_fn):
    import random
    for t in [md.load(get_fn('4waters.pdb')),  # no unit cell
              md.load(get_fn('native2.pdb')),  # unitcell
              md.load(get_fn('frame0.pdb'))]:  # multiframe
        with GroTrajectoryFile(temp, 'w') as f:
            f.write(t.xyz, t.topology, unitcell_vectors=t.unitcell_vectors,
                    precision=random.randint(4, 10))
        with GroTrajectoryFile(temp) as f:
            xyz, time, unitcell = f.read()
            top = f.topology
        eq(xyz, t.xyz, decimal=3)
        eq(list(top.atoms), list(t.top.atoms))
        if t.unitcell_vectors is not None:
            eq(unitcell, t.unitcell_vectors)
    # Test out the automatic saver and loader with different precisions
    t = md.load(get_fn('native2.pdb'))
    t.save(temp, precision=5)
    eq(t.xyz, md.load(temp).xyz, decimal=3)