code: def wrap_error(
              self, data, renderer_context, keys_are_fields, issue_is_title):
          response = renderer_context.get("response", None)
          status_code = str(response and response.status_code)
          errors = []
          for field, issues in data.items():
              if isinstance(issues, six.string_types):
                  issues = [issues]
              for issue in issues:
                  error = self.dict_class()
                  error["status"] = status_code
                  if issue_is_title:
                      error["title"] = issue
                  else:
                      error["detail"] = issue
                  if keys_are_fields:
                      if field in ('non_field_errors', NON_FIELD_ERRORS):
                          error["path"] = '/-'
                      else:
                          error["path"] = '/' + field
                  errors.append(error)
          wrapper = self.dict_class()
          wrapper["errors"] = errors
          return wrapper