<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def name(self, names=None):
 """Filter by node name. :param names: Node names to filter. :type names: ``list`` :return: A list of Node objects. :rtype: ``list`` of :class:`Node` """

        if names is None or not names:
            return self
        nodes = []
        for node in self.nodes:
            if any(name == node.name for name in names):
                nodes.append(node)
        self.nodes = nodes
        return self