<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def strframe(obj, extended=False):
 """ Return a string with a frame record pretty-formatted. The record is typically an item in a list generated by `inspect.stack() <https://docs.python.org/3/library/inspect.html#inspect.stack>`_). :param obj: Frame record :type obj: tuple :param extended: Flag that indicates whether contents of the frame object are printed (True) or not (False) :type extended: boolean :rtype: string """

    # Stack frame -> (frame object [0], filename [1], line number of current
    # line [2], function name [3], list of lines of context from source
    # code [4], index of current line within list [5])
    fname = normalize_windows_fname(obj[1])
    ret = list()
    ret.append(pcolor("Frame object ID: {0}".format(hex(id(obj[0]))), "yellow"))
    ret.append("File name......: {0}".format(fname))
    ret.append("Line number....: {0}".format(obj[2]))
    ret.append("Function name..: {0}".format(obj[3]))
    ret.append("Context........: {0}".format(obj[4]))
    ret.append("Index..........: {0}".format(obj[5]))
    if extended:
        ret.append("f_back ID......: {0}".format(hex(id(obj[0].f_back))))
        ret.append("f_builtins.....: {0}".format(obj[0].f_builtins))
        ret.append("f_code.........: {0}".format(obj[0].f_code))
        ret.append("f_globals......: {0}".format(obj[0].f_globals))
        ret.append("f_lasti........: {0}".format(obj[0].f_lasti))
        ret.append("f_lineno.......: {0}".format(obj[0].f_lineno))
        ret.append("f_locals.......: {0}".format(obj[0].f_locals))
        if hasattr(obj[0], "f_restricted"):  # pragma: no cover
            ret.append("f_restricted...: {0}".format(obj[0].f_restricted))
        ret.append("f_trace........: {0}".format(obj[0].f_trace))
    return "\n".join(ret)