def nla_find(head, len_, attrtype):
rem = c_int()<EOL>for nla in nla_for_each_attr(head, len_, rem):<EOL><INDENT>if nla_type(nla) == attrtype:<EOL><INDENT>return nla<EOL><DEDENT><DEDENT>return None<EOL>
Find a single attribute in a stream of attributes.

    https://github.com/thom311/libnl/blob/libnl3_2_25/lib/attr.c#L323

    Iterates over the stream of attributes and compares each type with the type specified. Returns the first attribute
    which matches the type.

    Positional arguments:
    head -- first nlattr with more in its bytearray payload (nlattr class instance).
    len_ -- length of attributes stream (integer).
    attrtype -- attribute type to look for (integer).

    Returns:
    Attribute found (nlattr class instance) or None.