concept calling contract in category ethereum

This is an excerpt from Manning's book Building Ethereum Dapps: Decentralized applications on the Ethereum blockchain.
When a library function is called, its code is executed within the context of the calling contract. For example, if the code of a function library references msg, this isn’t the message sent by the contract to the library, but the message received by the contract from its caller. Also, during a library function invocation, only the calling contract, not the library itself, accesses storage directly. This means library functions manipulate the value of any reference type variables with storage data locations passed to the functions. As mentioned earlier, libraries don’t permanently hold any objects at all.
You can execute a call in the context of the calling contract, which means it affects (and uses) the state of the calling contract. You can also execute it in the context of the external contract, which means it affects (and uses) the state of the external contract.