<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nlmsg_for_each_attr(nlh, hdrlen, rem):
 """Iterate over a stream of attributes in a message. https://github.com/thom311/libnl/blob/libnl3_2_25/include/netlink/msg.h#L123 Positional arguments: nlh -- Netlink message header (nlmsghdr class instance). hdrlen -- length of family header (integer). rem -- initialized to len, holds bytes currently remaining in stream (c_int). Returns: Generator yielding nl_attr instances. """

    return nla_for_each_attr(nlmsg_attrdata(nlh, hdrlen), nlmsg_attrlen(nlh, hdrlen), rem)