"""Get the platform state. This method should fill-in a new ClusterStats object at each call, with fresh statistics on the available nodes and resource availability. This information will be used for taking scheduling decisions."""
"""Retrieves the state of the platform by querying the container backend. Platform state includes information on free/reserved resources for each node. This information is used for advanced scheduling.
Since retrieving statistics can be slow, the we cache results and use the force_update parameter to know when fresh (and slow) values are absolutely needed."""
globalCACHED_STATS
ifCACHED_STATSisnotNoneandnotforce_update:
returnCACHED_STATS
Since retrieving usage statistics is slow, you need to ask for them explicitly."""