<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_detail_level(self, detail_levels):
 """ Sets the detail levels from the input dictionary in detail_levels. """

        if detail_levels is None:
            return

        self.detail_levels = detail_levels
        if 'api' in detail_levels:
            self.api_detail_level = detail_levels['api']
        if 'http' in detail_levels:
            self.http_detail_level = detail_levels['http']
        if isinstance(self.api_detail_level, int):
            self.api_maxlen = self.api_detail_level
        if isinstance(self.http_detail_level, int):
            self.http_maxlen = self.http_detail_level