def is_builtin_class_method(obj, attr_name):
 classes = [c for c in inspect.getmro(obj) if (attr_name in c.__dict__)]
 cls = (classes[0] if classes else object)
 if (not hasattr(builtins, safe_getattr(cls, '__name__', ''))):
  return False
 return (getattr(builtins, safe_getattr(cls, '__name__', '')) is cls)

def is_builtin_class_method ( obj , attr_name ) : classes = [ c for c in inspect . getmro ( obj ) if ( attr_name in c . __dict__ ) ] cls = ( classes [ 0 ] if classes else object ) if ( not hasattr ( builtins , safe_getattr ( cls , '__name__' , '' ) ) ) : return False return ( getattr ( builtins , safe_getattr ( cls , '__name__' , '' ) ) is cls )
if attr_name is implemented at builtin class .