code: def check_encoding_chars(encoding_chars):
      
      if not isinstance(encoding_chars, collections.MutableMapping):
          raise InvalidEncodingChars
      required = {'FIELD', 'COMPONENT', 'SUBCOMPONENT', 'REPETITION', 'ESCAPE'}
      missing = required - set(encoding_chars.keys())
      if missing:
          raise InvalidEncodingChars('Missing required encoding chars')
  
      values = [v for k, v in encoding_chars.items() if k in required]
      if len(values) > len(set(values)):
          raise InvalidEncodingChars('Found duplicate encoding chars')
docs: Validate the given encoding chars
  
      :type encoding_chars: ``dict``
      :param encoding_chars: the encoding chars (see :func:`hl7apy.set_default_encoding_chars`)
      :raises: :exc:`hl7apy.exceptions.InvalidEncodingChars` if the given encoding chars are not valid