code: def map_helper(data):
      
      as_list = []
      length = 2
      for field, value in data.items():
          as_list.append(Container(field=bytes(field, ENCODING),
                                   value=bytes(value, ENCODING)))
          length += len(field) + len(value) + 4
      return (Container(
          num=len(as_list),
          map=as_list
      ), length)
docs: Build a map message.