@pipe.func<EOL>def attrs(prev, attr_names):
for obj in prev:<EOL><INDENT>attr_values = []<EOL>for name in attr_names:<EOL><INDENT>if hasattr(obj, name):<EOL><INDENT>attr_values.append(getattr(obj, name))<EOL><DEDENT><DEDENT>yield attr_values<EOL><DEDENT>
attrs pipe can extract attribute values of object.

    If attr_names is a list and its item is not a valid attribute of
    prev's object. It will be excluded from yielded dict.

    :param prev: The previous iterator of pipe.
    :type prev: Pipe
    :param attr_names: The list of attribute names
    :type attr_names: str of list
    :returns: generator