code: def to_er7(self, encoding_chars=None, trailing_children=False):
          
  
          if encoding_chars is None:
              encoding_chars = self.encoding_chars
          try:
              return self.value.to_er7(encoding_chars)
          except AttributeError:
              return self.value
docs: Return the ER7-encoded string
  
          :type encoding_chars: ``dict``
          :param encoding_chars: a dictionary containing the encoding chars or None to use the default
              (see :func:`get_default_encoding_chars <hl7apy.get_default_encoding_chars>`)
  
          :type trailing_children: ``bool``
          :param trailing_children: if ``True``, trailing children will be added even if their value is None
  
          :return: the ER7-encoded string
  
          >>> s = SubComponent("CE_1")
          >>> s.value = "IDENTIFIER"
          >>> print(s.to_er7())
          IDENTIFIER