Explain in docstring what this function aim to do