code: def _serialize_ep(ep, varprops, version=_default_version):
      
      # ('nodeid', 'pred', 'label', 'args', 'lnk', 'surface', 'base')
      args = ep[3]
      arglist = ' '.join([_serialize_argument(rarg, args[rarg], varprops)
                          for rarg in sorted(args, key=rargname_sortkey)])
      if version < 1.1 or len(ep) < 6 or ep[5] is None:
          surface = ''
      else:
          surface = ' "%s"' % ep[5]
      lnk = None if len(ep) < 5 else ep[4]
      pred = ep[1]
      predstr = pred.string
      return '[ {pred}{lnk}{surface} LBL: {label}{s}{args} ]'.format(
          pred=predstr,
          lnk=_serialize_lnk(lnk),
          surface=surface,
          label=str(ep[2]),
          s=' ' if arglist else '',
          args=arglist
      )
docs: Serialize an Elementary Predication into the SimpleMRS encoding.