Use Literal Blocks to write code sample in docstring

In python docstring, one should use Literal Blocks to write sample
code otherwise one gets build warnings and badly formatted documents.

Also, because sphinx treats the line which starts ".." as a comment,
this patch moves "..." to the end of the previous line.

Change-Id: I0bbd61d43daaffe9de579b1a6b50ea6826bdfd50
Partial-bug: 1277282
Merge "Use Literal Blocks to write code sample in docstring"