A part to whole analogy compares a component of something to the larger entity it belongs to. In this case, the most fitting example is:
pen : write : : books : library
This analogy reflects that a pen is a part of the action of writing, just as books are part of a library.