code: def lambertian_shading(
      mesh,
      diffuse_colour=0.4,
      albedo_weighting=0.6,
      ambient_colour=0.2,
      light_positions=(
          (45, 45, 1),
          (30, 60, 10),
          (30, 60, 0.5),
          (0, 0, 1),
      ),
  ):
      diffuse_colour = np.asarray(diffuse_colour)
      light_positions = l2_normalize(
          np.asarray(light_positions).reshape(-1, 3), axis=0
      )
  
      unit_transform = mesh_in_unit_sphere(mesh)
      mesh = unit_transform.apply(mesh)
  
      light_directions = l2_normalize(
          light_positions.reshape(-1, 1, 3) - mesh.points[None, ...],
          axis=0,
      )
  
      # Calculate the lambertian reflectance for each light source.
      # This will be an `ndarray` of shape(num_light_sources, num_vertices)
      lambertian = np.sum(
          light_directions * mesh.vertex_normals()[None, ...], 2
      )[..., None]
  
      # Sum up the contribution of all the light sources and multiply by the
      # diffusion colour.
      lambertian = lambertian.sum(0) * diffuse_colour + ambient_colour
  
      mesh.colours[...] = np.clip(
          mesh.colours * albedo_weighting
          + lambertian * (1 - albedo_weighting),
          0,
          1,
      )
  
      return unit_transform.pseudoinverse().apply(mesh)
  
imports: import numpy
  from menpo.transform import UniformScale, Translation
label_desc: Use image node_id 3 for calling a global function with example usage: lambertian_shading(mesh, diffuse_colour, albedo_weighting, ambient_colour, light_positions) and returns: unit_transform