def METHOD_NAME(fn):
    """
    Load PLY from file.
    """
    with open(fn, 'rb+') as f:
        line = ''
        order = ''
        file_format = None
        colors = False
        n_vertices = 0
        n_faces = 0
        while not line.startswith('end_header'):
            line = f.readline().decode('ascii')
            if line.startswith('format'):
                file_format = line.split(' ')[1]
            if line.startswith('property uchar red'):
                # We assume this means a full RGB profile
                colors = True
            if line.startswith('element'):
                split_line = line.split(' ')
                if split_line[1] == 'vertex':
                    n_vertices = int(split_line[2])
                elif split_line[1] == 'face':
                    n_faces = int(split_line[2])
        if file_format == 'binary_little_endian':
            order = '<'
        if file_format == 'binary_big_endian':
            order = '>'
        if file_format == 'ascii':
            vertices = np.zeros((n_vertices, 3), dtype=np.float32)
            if colors:
                color = np.zeros((n_vertices, 3), dtype=np.ubyte)
            faces = np.zeros((n_faces, 3), dtype=np.int32)
            for l in np.arange(n_vertices):
                line = f.readline().decode('ascii').strip().split(' ')
                vertices[l, 0] = np.float32(line[0])
                vertices[l, 1] = np.float32(line[1])
                vertices[l, 2] = np.float32(line[2])
                if colors:
                    color[l, 0] = np.ubyte(line[3])
                    color[l, 1] = np.ubyte(line[4])
                    color[l, 2] = np.ubyte(line[5])
            for l in np.arange(n_faces):
                line = f.readline().decode('ascii').strip().split(' ')
                n_elements = np.int32(line[0])
                faces[l, 0] = np.int32(line[1])
                faces[l, 1] = np.int32(line[2])
                faces[l, 2] = np.int32(line[3])
            if colors:
                return vertices, faces, color
            else:
                return vertices, faces, np.zeros_like(vertices)
        else:
            if colors:
                vc = np.fromfile(f, [('vertices', order+'3f4'), ('colors', '3u1')], n_vertices)
            else:
                vc = np.fromfile(f, order+'3f4', n_vertices)
            faces = np.fromfile(f, [('n_elements', 'u1'), ('elements', order+'3i4')] , n_faces)
            if colors:
                return vc['vertices'], faces['elements'], vc['colors']
            else:
                 return vc, faces['elements'], np.zeros_like(vc)