'Return the fully qualified name or a Name or Attribute.'

def _find_name(self, node):

    if isinstance(node, ast.Name):
        return node.id
    elif (isinstance(node, ast.Attribute) and isinstance(node.value, (ast.Name, ast.Attribute))):
        method_name = node.attr
        obj_name = self._find_name(node.value)
        if (obj_name is None):
            return None
        return ((obj_name + '.') + method_name)
    elif isinstance(node, six.string_types):
        return node
    else:
        return None
