def indent_string(string, chars):
  """Indents a string by x number of characters."""

  indented_string = ''
  for line in string.splitlines():
    indented_string += '%s%s\n' % ((' ' * chars), line)

  # Strip the ending '\n' and return result.
  return indented_string[0:-1]