code: def test_save_ply_texture_array_catch(sphere, as_str, tmpdir):
      filename = str(tmpdir.mkdir("tmpdir").join("tmp.ply"))
  
      texture = np.ones((sphere.n_points, 3), np.float32)
      with pytest.raises(ValueError, match="Invalid datatype"):
          if as_str:
              sphere.point_data["texture"] = texture
              sphere.save(filename, texture="texture")
          else:
              sphere.save(filename, texture=texture)
  
      with pytest.raises(TypeError):
          sphere.save(filename, texture=[1, 2, 3])
  
imports: import numpy
  import pytest
  import vtk
  import pyvista
  from pyvista import examples
  from pyvista.core.errors import VTKVersionError
  from pyvista.plotting.texture import numpy_to_texture
label_desc: Use image node_id 19 for calling a global function with example usage: test_save_ply_texture_array_catch(sphere, as_str, tmpdir) without return types