def prettify(method):
    """Return a pretty representation of a method for use with logging

        Args:
            method      Bound method instance

        Returns:
            string      in the form MyClass.my_method
    """
    rs = ""
    if hasattr(method, "im_self") and method.__dict__.has_key('__self__'):
        rs += str(method.__self__.__class__.__name__)
    elif hasattr(method, "im_self") and method.__dict__.has_key('__class__'):
        rs += str(method.__class__.__name__)

    if hasattr(method, "im_func") and method.__dict__.has_key('__func__'):
        rs += '.' + method.__func__.__name__

    if not rs and hasattr(method, 'func_name'):
        rs += method.func_name
    return rs