import types


def is_function(tup):
    """ Takes (name, object) tuple, returns True if it is a function.
    """
    name, item = tup
    return isinstance(item, types.FunctionType)

    # def _start(self, spin):
    #     for args, kwargs in self.subscribers:
    #         self.subscribers_init.append(rospy.Subscriber(*args, **kwargs))
    #     is_func = isinstance(self.cl, types.FunctionType