Technically, the lighting is already implemented (in the same way as 1.X), but it isn't this straightforward to use.
As far as I'm aware, the only lighting model currently implemented by default is Gouraud shading (when using the default shader and normals on your vertices - I don't believe it actually does anything to standard sprites except make them appear the same color as whatever "draw_light_define_ambient(col)" is set to, as they don't have normals - it's only really useful when using 3D.
Alternate shading techniques and shadow casting need to be implemented by us (I assume that's kinda what you're after). If you want shading, you going to need a shader (which we either need to write ourselves or see if there's one we like on the marketplace or somewhere). Shadow casting varies a little more, depending on what we want, but I think there's a lot of downloadable projects from 1.X that may still work (I usually use surfaces and sprite combos, which should be compatible with GMS2).
To summarise, basic lighting is implemented, but it is by no means automatic - the code you have posted from the manual won't really do much unless you either use shaders and/or vertex_buffers with normals defined. Shadow casting is also not something automatic and we need to build that ourselves too (which makes sense since there's so many ways of doing it)
I hope this can help in some way! If you can provide some kind of idea of what you want as well - like a mockup and a description of the effect you want to achieve - it's very possible we can help you out further!