def _pickle_method(m):
    """
    Method to allow object pickling.

    Parameters
    ----------
    m: `object` or None
       Object pickle?

    Returns
    -------
    attr: Attributes to pickle?
    """
    # if m.im_self is None:
    #     return getattr, (m.im_class, m.im_func.func_name)
    # else:
    #     return getattr, (m.im_self, m.im_func.func_name)

    # @jacobic: + py3 support
    if m.__self__ is None:
        return getattr, (m.im_class, m.__func__.__name__)
    else:
        return getattr, (m.__self__, m.__func__.__name__)