docs: def format_report(cls, instance, trcback, context=1):
      """
      Formats a report using given exception.
  
      :param cls: Exception class.
      :type cls: object
      :param instance: Exception instance.
      :type instance: object
      :param trcback: Traceback.
      :type trcback: Traceback
      :param context: Context being included.
      :type context: int
      :return: Formated report.
      :rtype: tuple
      """
  
      header = []
      header.append("Exception in '{0}'.".format(get_inner_most_frame(trcback).f_code.co_name))
      header.append("Exception class: '{0}'.".format(cls.__name__))
      header.append("Exception description: '{0}'.".format(instance.__doc__ and instance.__doc__.strip() or
                                                           Constants.null_object))
      for i, line in enumerate(str(instance).split("\n")):
          header.append("Exception message line no. '{0}' : '{1}'.".format(i + 1, line))
  
      frames = []
      for frame, locals in extract_locals(trcback):
          frames.append("Frame '{0}' in '{1}' at line '{2}':".format(*frame))
          arguments, nameless_args, keyword_args, locals = locals
          any((arguments, nameless_args, keyword_args)) and frames.append("{0:>40}".format("Arguments:"))
          for key, value in arguments.iteritems():
              frames.append("{0:>40} = {1}".format(key, value))
          for value in nameless_args:
              frames.append("{0:>40}".format(value))
          for key, value in sorted(keyword_args.iteritems()):
              frames.append("{0:>40} = {1}".format(key, value))
          locals and frames.append("{0:>40}".format("Locals:"))
          for key, value in sorted(locals.iteritems()):
              frames.append("{0:>40} = {1}".format(key, value))
          frames.append("")
  
      trcback = format_exception(cls, instance, trcback)
  
      return header, frames, trcback