<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def section(msg):
 """ Context manager that prints a top bar to stderr upon entering and a bottom bar upon exiting. The caption of the top bar is specified by `msg`. The successfully. If a SectionError or SectionWarning is raised inside of the context manager, SectionError.message or SectionWarning.message is passed to logging.error or logging.warning respectively and the bottom bar caption """

    logger.info(bar(msg, position='top'))
    try:
        yield
    except SectionError as e:
        logger.error(e)
        logger.info(bar('...skipped.', position='bottom'))
    except SectionWarning as e:
        logger.warning(e)
        logger.info(bar('...skipped.', position='bottom'))
    else:
        logger.info(bar('...done!', position='bottom'))