code: def pointcloud2ply(vertices, normals, out_file=None):
      
      from pathlib import Path
      import pandas as pd
      from pyntcloud import PyntCloud
      df = pd.DataFrame(np.hstack((vertices, normals)))
      df.columns = ['x', 'y', 'z', 'nx', 'ny', 'nz']
      cloud = PyntCloud(df)
  
      if out_file is None:
          out_file = Path('pointcloud.ply').resolve()
  
      cloud.to_file(str(out_file))
      return out_file
docs: Converts the file to PLY format