def _get_cell():
    curr = getcurrent()
    try:
        cell = curr._cell
    except __HOLE__:
        if hasattr(curr, 'spawn_actor'):
            cell = curr
        else:
            return None
    # give out the method, not the cell object itself, to avoid exposing the internals
    return cell
dataset/ETHPy150Open eallik/spinoff/spinoff/actor/context.py/_get_cell