def get_repo_dir():
    """Return the path of the MMPose repo directory."""
    try:
        # Assume the function in invoked is the source mmpose repo
        repo_dir = osp.dirname(osp.dirname(osp.dirname(__file__)))
    except NameError:
        # For IPython development when __file__ is not defined
        import mmpose
        repo_dir = osp.dirname(osp.dirname(mmpose.__file__))

    return repo_dir
Return the path of the MMPose repo directory.
mmpose/mmpose/testing/_utils.py