<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def json_2_text(inp, out, verbose = False):
 """Convert a Wikipedia article to Text object. Concatenates the sections in wikipedia file and rearranges other information so it can be interpreted as a Text object. Links and other elements with start and end positions are annotated as layers. Parameters inp: directory of parsed et.wikipedia articles in json format out: output directory of .txt files verbose: if True, prints every article title and total count of converted files if False prints every 50th count Returns ------- estnltk.text.Text The Text object. """


    for root, dirs, filenames in os.walk(inp):
        for f in filenames:
            log = codecs.open(os.path.join(root, f), 'r')
            j_obj = json.load(log)
            j_obj = json_format(j_obj)

            #not needed, cause the json_format takes care of the right structuring
            #text = Text(j_obj)

            textWriter(j_obj, out, verbose)