Docstring for functions.

Docstring for various functions describing the purpose and keyword
arguments passed to the functions.

Signed-off-by: Srijan Mishra <srijan23mishra@gmail.com>