code: def _configure_detail_level(cls, detail_level):
          
          # process detail_level
          if isinstance(detail_level, six.string_types):
              if detail_level not in LOG_DETAIL_LEVELS:
                  raise ValueError(
                      _format("Invalid log detail level string: {0!A}; must be "
                              "one of: {1!A}", detail_level, LOG_DETAIL_LEVELS))
          elif isinstance(detail_level, int):
              if detail_level < 0:
                  raise ValueError(
                      _format("Invalid log detail level integer: {0}; must be a "
                              "positive integer.", detail_level))
  
          elif detail_level is None:
              detail_level = DEFAULT_LOG_DETAIL_LEVEL
          else:
              raise ValueError(
                  _format("Invalid log detail level: {0!A}; must be one of: "
                          "{1!A}, or a positive integer",
                          detail_level, LOG_DETAIL_LEVELS))
          return detail_level
docs: Validate the `detail_level` parameter and return it.
  
          This accepts a string or integer for `detail_level`.