code: def _find_frame(stack, start=0):
    
    # We want to find the first place where the layer was called
    # that is *not* an __init__ function of an inheriting layer.
    frame = inspect.getframeinfo(stack[start][0])
    # If we are in an init, move on.
    if frame.function == '__init__':
      return _find_frame(stack, start + 1)
    return frame
docs: Find the frame with the caller on the stack.