def hasmethod(obj, meth):
  if hasattr(obj, meth):
    return callable(getattr(obj,meth))
  return False
Checks if an object, obj, has a callable method, meth
dataset/ETHPy150Open nikcub/floyd/floyd/util/object.py/hasmethod