def reindent(s, numSpaces=4, no_empty_lines=False):
    """ Return string s reindented by `numSpaces` spaces

        Args:
            s (string): string to reindent
            numSpaces (int): number of spaces to shift to the right
            no_empty_lines (bool): if True remove empty lines

        Returns:
            reindented string
    """
    if no_empty_lines:
        lines = [numSpaces * " " + line if line
                else line for line in  s.splitlines()]
    else:
        lines = [numSpaces * " " + line for line in s.splitlines()]
    return "\n".join(lines)