code: def indent_string(string, num_spaces=2):
      '''Add indentation to a string.
  
      Replaces all new lines in the string with a new line followed by the
      specified number of spaces, and adds the specified number of spaces to the
      start of the string.
  
      '''
      indent = ' '.ljust(num_spaces)
      return indent + re.sub('\n', '\n' + indent, stringf indent_string(string, num_spaces=2):
      '''Add indentation to a string.
  
      Replaces all new lines in the string with a new line followed by the
      specified number of spaces, and adds the specified number of spaces to the
      start of the string.
  
      '''
      indent = ' '.ljust(num_spaces)
      return indent + re.sub('\n', '\n' + indent, string)
docs: Add indentation to a string.
  
      Replaces all new lines in the string with a new line followed by the
      specified number of spaces, and adds the specified number of spaces to the
      start of the string.