code: def has_methods(*method_names):
      
  
      def test(obj):
          for method_name in method_names:
              try:
                  method = getattr(obj, method_name)
              except AttributeError:
                  return False
              else:
                  if not callable(method):
                      return False
                  if not isinstance(obj, type):
                      try:
                          # An instance method is a method type with a __self__
                          # attribute that references the instance.
                          if method.__self__ is not obj:
                              return False
                      except AttributeError:
                          return False
          return True
  
      return test
docs: Return a test function that, when given an object (class or an
      instance), returns ``True`` if that object has all of the (regular) methods
      in ``method_names``. Note: this is testing for regular methods only and the
      test function will correctly return ``False`` if an instance has one of the
      specified methods as a classmethod or a staticmethod. However, it will
      incorrectly return ``True`` (false positives) for classmethods and
      staticmethods on a *class*.