code: def get_string(self, recalculate_width=True):
          
          # Empty table. returning empty string.
          if len(self._table) == 0:
              return ''
  
          if self.serialno and self.column_count > 0:
              self.insert_column(0, self.serialno_header,
                                 range(1, len(self) + 1))
  
          # Should widths of column be recalculated
          if recalculate_width or sum(self._column_widths) == 0:
              self._calculate_column_widths()
  
          string_ = []
  
          # Drawing the top border
          if self.top_border_char:
              string_.append(
                  self._get_top_border())
  
          # Print headers if not empty or only spaces
          if ''.join(self._column_headers).strip():
              headers = to_unicode(self._column_headers)
              string_.append(headers)
  
              if self.header_separator_char:
                  string_.append(
                      self._get_header_separator())
  
          # Printing rows
          first_row_encountered = False
          for row in self._table:
              if first_row_encountered and self.row_separator_char:
                  string_.append(
                      self._get_row_separator())
              first_row_encountered = True
              content = to_unicode(row)
              string_.append(content)
  
          # Drawing the bottom border
          if self.bottom_border_char:
              string_.append(
                  self._get_bottom_border())
  
          if self.serialno and self.column_count > 0:
              self.pop_column(0)
  
          return '\n'.join(string_)
docs: Get the table as a String.
  
          Parameters
          ----------
          recalculate_width : bool, optional
              If width for each column should be recalculated(default True).
              Note that width is always calculated if it wasn't set
              explicitly when this method is called for the first time ,
              regardless of the value of `recalculate_width`.
  
          Returns
          -------
          str:
              Table as a string.