code: def encode_list(key, list_):
      # type: (str, Iterable) -> Dict[str, str]
      
      if not list_:
          return {}
      return {key: " ".join(str(i) for i in list_)}
docs: Converts a list into a space-separated string and puts it in a dictionary
  
      :param key: Dictionary key to store the list
      :param list_: A list of objects
      :return: A dictionary key->string or an empty dictionary