def get_instance_el(evaluator, instance, var, is_class_var=False):
 if isinstance(var, tree.Name):
  parent = get_instance_el(evaluator, instance, var.parent, is_class_var)
  return InstanceName(var, parent)
 elif ((var.type != 'funcdef') and isinstance(var, (Instance, compiled.CompiledObject, tree.Leaf, tree.Module, FunctionExecution))):
  return var
 var = evaluator.wrap(var)
 return InstanceElement(evaluator, instance, var, is_class_var)

def get_instance_el ( evaluator , instance , var , is_class_var = False ) : if isinstance ( var , tree . Name ) : parent = get_instance_el ( evaluator , instance , var . parent , is_class_var ) return InstanceName ( var , parent ) elif ( ( var . type != 'funcdef' ) and isinstance ( var , ( Instance , compiled . CompiledObject , tree . Leaf , tree . Module , FunctionExecution ) ) ) : return var var = evaluator . wrap ( var ) return InstanceElement ( evaluator , instance , var , is_class_var )
returns an instanceelement if it makes sense .