code: def get_diff(a, b, *args, **kwargs):
      '''
      Perform diff on two iterables containing lines from two files, and return
      the diff as as string. Lines are normalized to str types to avoid issues
      with unicode on PY2.
      '''
      encoding = ('utf-8', 'latin-1', __salt_system_encoding__)
      # Late import to avoid circular import
      import salt.utils.data
      return ''.join(
          difflib.unified_diff(
              salt.utils.data.decode_list(a, encoding=encoding),
              salt.utils.data.decode_list(b, encoding=encoding),
              *args, **kwargs
          )
      f get_diff(a, b, *args, **kwargs):
      '''
      Perform diff on two iterables containing lines from two files, and return
      the diff as as string. Lines are normalized to str types to avoid issues
      with unicode on PY2.
      '''
      encoding = ('utf-8', 'latin-1', __salt_system_encoding__)
      # Late import to avoid circular import
      import salt.utils.data
      return ''.join(
          difflib.unified_diff(
              salt.utils.data.decode_list(a, encoding=encoding),
              salt.utils.data.decode_list(b, encoding=encoding),
              *args, **kwargs
          )
      )
docs: Perform diff on two iterables containing lines from two files, and return
      the diff as as string. Lines are normalized to str types to avoid issues
      with unicode on PY2.