def _visit_or_none(node, attr, visitor, parent, visit="<STR_LIT>", **kws):
value = getattr(node, attr, None)<EOL>if value:<EOL><INDENT>return getattr(visitor, visit)(value, parent, **kws)<EOL><DEDENT>return None<EOL>
If the given node has an attribute, visits the attribute, and
    otherwise returns None.