def METHOD_NAME(args: GetBlockModel):
    d = get_doc_or_abort(args.doc_id)
    area_start = args.area_start
    area_end = args.area_end
    if area_start and area_end:
        verify_copy_access(d)
        try:
            section = d.document.export_section(area_start, area_end)
        except TimDbException as e:
            raise NotExist("Area not found. It may have been deleted.")
        return json_response({"text": section})
    else:
        try:
            p = d.document.get_paragraph(args.par_id)
            if not can_see_par_source(get_current_user_object(), p):
                raise AccessDenied()
            if args.par_hash:
                par = DocParagraph.get(
                    d.document, args.par_id, args.par_hash or p.get_hash()
                )
            else:
                par = p
        except TimDbException as e:
            raise NotExist("Paragraph not found. It may have been deleted.")
        if args.use_exported:
            return json_response({"text": par.get_exported_markdown()})
        else:
            return json_response({"text": par.get_markdown()})