def METHOD_NAME(xyz_in, xyz_out, epsg_code):
    grass.message(_("Projecting..."))
    # lazy import
    # TODO: replace by pure GRASS GIS if pyproj not available
    try:
        import pyproj
    except ImportError:
        grass.fatal(
            _(
                "pyproj not found, install it first, e.g.:"
                " pip install pyproj"
                " (https://jswhit.github.io/pyproj)"
            )
        )
    # define projections
    loc_proj = grass.read_command("g.proj", flags="jf")
    loc_proj = pyproj.Proj(loc_proj.strip())
    epsg_proj = pyproj.Proj("epsg:" + str(epsg_code))
    # Create transformation object
    transformer = pyproj.Transformer.from_proj(loc_proj, epsg_proj)
    # open files
    f_in = open(xyz_in, "r")
    f_out = open(xyz_out, "w")
    # read input coordinates file
    for line in f_in.readlines():
        # do the projection
        for pnt in transformer.itransform([list(map(float, [line.split()]))]):
            # write output to file
            f_out.write("{} {} {}\n".format(*pnt))
    # close files
    f_in.close()
    f_out.close()