def insert_contents_table(title='', depth=1):
    """
    Insert a sphinx directive to insert a contents page with
    a configurable title and depth.
    """
    text = '''\n
.. contents:: {}
   :depth: {}
   :local:\n
'''.format(title, depth)
    return text