<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def map_helper(data):
 """ Build a map message. """

    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)