def ax3d_handle(return_fig=False, **kwargs):
    if ('ax' in kwargs):
        ax = kwargs['ax']
    else:
        fig = plt.figure(figsize=(8, 6))
        ax = fig.add_subplot(projection='3d')
    if return_fig:
        return (ax, fig)
    return ax
def ax3d_handle(return_fig=False, **kwargs):
    if ('ax' in kwargs):
        ax = kwargs['ax']
    else:
        fig = plt.figure(figsize=(8, 6))
        ax = fig.add_subplot(projection='3d')
    if return_fig:
        return (ax, fig)
    return ax