<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def astral(msg):
 """Does `msg` have characters outside the Basic Multilingual Plane?"""

    # Python2 narrow builds present astral characters as surrogate pairs.
    # By encoding as utf32, and decoding DWORDS, we can get at the real code
    # points.
    utf32 = msg.encode("utf32")[4:]         # [4:] to drop the bom
    code_points = struct.unpack("%dI" % (len(utf32) / 4), utf32)
    return any(cp > 0xFFFF for cp in code_points)