code: def fold_string(input_string, max_width):
      
      new_string = input_string
      if isinstance(input_string, six.string_types):
          if max_width < len(input_string):
              # use textwrap to fold the string
              new_string = textwrap.fill(input_string, max_width)
  
      return new_string
docs: Fold a string within a maximum width.
  
        Parameters:
  
          input_string:
            The string of data to go into the cell
          max_width:
            Maximum width of cell.  Data is folded into multiple lines to
            fit into this width.
  
        Return:
            String representing the folded string