As a master thesis supervisor I can give you the following advice
- If it comes to code, go ahead and copy paste and make adjustments to your needs. It has a BSD license which means you can basically do anything with it.
- When it comes to images, that is a complete different story. The copyright of an image is always to the person who actually made the image, even if it is inside a library that has a BSD license. So basically just grabbing images from the docs and use them in your thesis is plagiarism BUT many supervisors don't mind it as long as you do not fill your thesis with googled images.
- However, in my own and collegues experience, the best way is to make your own images and sketches for your thesis. It has a professional look, you prove that you actually grasp what is in the image, ...
If you want good and extra points, go for 3!