code: def guess_line_ending(string):
      '''Return the most likely line delimiter from the string.'''
      assert isinstance(string, str), 'Expect str. Got {}'.format(type(string))
      crlf_count = string.count('\r\n')
      lf_count = string.count('\n')
  
      if crlf_count >= lf_count:
          return '\r\n'
      else:
          return '\nf guess_line_ending(string):
      '''Return the most likely line delimiter from the string.'''
      assert isinstance(string, str), 'Expect str. Got {}'.format(type(string))
      crlf_count = string.count('\r\n')
      lf_count = string.count('\n')
  
      if crlf_count >= lf_count:
          return '\r\n'
      else:
          return '\n'
docs: Return the most likely line delimiter from the string.