code: def to_import_properties(properties):
      # type: (dict) -> dict
      
      # Copy the given dictionary
      props = properties.copy()
  
      # Add the "imported" property
      props[pelix.remote.PROP_IMPORTED] = True
  
      # Remote service ID
      try:
          props[pelix.remote.PROP_ENDPOINT_SERVICE_ID] = props.pop(
              pelix.constants.SERVICE_ID
          )
      except KeyError:
          # No service ID
          pass
  
      # Replace the "export configs"
      configs = props.pop(pelix.remote.PROP_EXPORTED_CONFIGS, None)
      if configs:
          props[pelix.remote.PROP_IMPORTED_CONFIGS] = configs
  
      # Clear other export properties
      for key in (
          pelix.remote.PROP_EXPORTED_INTENTS,
          pelix.remote.PROP_EXPORTED_INTENTS_EXTRA,
          pelix.remote.PROP_EXPORTED_INTERFACES,
      ):
          try:
              del props[key]
          except KeyError:
              # Key wasn't there
              pass
  
      return props
docs: Returns a dictionary where export properties have been replaced by import
      ones
  
      :param properties: A dictionary of service properties (with export keys)
      :return: A dictionary with import properties