def register_builtin_transform(transform, builtin_name):
 def _transform_wrapper(node, context=None):
  result = transform(node, context=context)
  if result:
   result.parent = node
   result.lineno = node.lineno
   result.col_offset = node.col_offset
  return iter([result])
 MANAGER.register_transform(nodes.CallFunc, inference_tip(_transform_wrapper), (lambda n: (isinstance(n.func, nodes.Name) and (n.func.name == builtin_name))))

def register_builtin_transform ( transform , builtin_name ) : def _transform_wrapper ( node , context = None ) : result = transform ( node , context = context ) if result : result . parent = node result . lineno = node . lineno result . col_offset = node . col_offset return iter ( [ result ] ) MANAGER . register_transform ( nodes . CallFunc , inference_tip ( _transform_wrapper ) , ( lambda n : ( isinstance ( n . func , nodes . Name ) and ( n . func . name == builtin_name ) ) ) )
register a new transform function for the given *builtin_name* .