code: def encode_osgi_props(ed):
      # type: (EndpointDescription) -> Dict[str, str]
      
      result_props = {}
      intfs = ed.get_interfaces()
      result_props[OBJECTCLASS] = " ".join(intfs)
      for intf in intfs:
          pkg_name = package_name(intf)
          ver = ed.get_package_version(pkg_name)
          if ver and not ver == (0, 0, 0):
              result_props[ENDPOINT_PACKAGE_VERSION_] = ".".join(
                  str(v) for v in ver
              )
  
      result_props[ENDPOINT_ID] = ed.get_id()
      result_props[ENDPOINT_SERVICE_ID] = "{0}".format(ed.get_service_id())
      result_props[ENDPOINT_FRAMEWORK_UUID] = ed.get_framework_uuid()
      imp_configs = ed.get_imported_configs()
      if imp_configs:
          result_props[SERVICE_IMPORTED_CONFIGS] = " ".join(
              ed.get_imported_configs()
          )
      intents = ed.get_intents()
      if intents:
          result_props[SERVICE_INTENTS] = " ".join(intents)
      remote_configs = ed.get_remote_configs_supported()
      if remote_configs:
          result_props[REMOTE_CONFIGS_SUPPORTED] = " ".join(remote_configs)
      remote_intents = ed.get_remote_intents_supported()
      if remote_intents:
          result_props[REMOTE_INTENTS_SUPPORTED] = " ".join(remote_intents)
      return result_props
docs: Prepares a dictionary of OSGi properties for the given EndpointDescription