<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _color_level(str_, level):
 """ Return the string wrapped with the appropriate styling for the message level. The styling will be determined based on the rez configuration. Args: str_ (str):
 The string to be wrapped. level (str):
 The message level. Should be one of 'critical', 'error', 'warning', 'info' or 'debug'. Returns: str: The string styled with the appropriate escape sequences. """

    fore_color, back_color, styles = _get_style_from_config(level)
    return _color(str_, fore_color, back_color, styles)