'Analyze callback and determine its consituents
Args:
callback (function or method): This is either a stand-alone
function or class method on a typeclassed entitye (that is,
an entity that can be saved to the database).
Returns:
ret (tuple): This is a tuple of the form `(obj, path, callfunc)`,
where `obj` is the database object the callback is defined on
if it\'s a method (otherwise `None`) and vice-versa, `path` is
the python-path to the stand-alone function (`None` if a method).
The `callfunc` is either the name of the method to call or the
callable function object itself.'

def _get_callback(self, callback):

    (outobj, outpath, outcallfunc) = (None, None, None)
    if callable(callback):
        if inspect.ismethod(callback):
            outobj = callback.im_self
            outcallfunc = callback.im_func.func_name
        elif inspect.isfunction(callback):
            outpath = ('%s.%s' % (callback.__module__, callback.func_name))
            outcallfunc = callback
    else:
        raise TypeError(('%s    is    not    a    callable    function    or    method.' % callback))
    return (outobj, outpath, outcallfunc)
