def getframeinfo(frame, context=1):
    if istraceback(frame):
        lineno = frame.tb_lineno
        frame = frame.tb_frame
    else:
        lineno = frame.f_lineno

    if not isframe(frame):
        raise TypeError('{!r} is not a frame or traceback object'.format(frame))

    filename = getsourcefile(frame) or getfile(frame)

    lines = None
    if filename == "<stdin>":
        lineno = StdinCache.singleton().refreshFromReadline().findCodeLineNumberWithinStdin(frame.f_code) + 1
        lines = StdinCache.singleton().getlines()


    if context > 0:
        start = lineno - 1 - context//2
        try:
            if lines is None:
                lines, _ = findsource(frame)
        except IOError:
            if lines is None:
                lines = index = None
        else:
            start = max(start, 1)
            start = max(0, min(start, len(lines) - context))
            lines = lines[start:start+context]
            index = lineno - 1 - start
    else:
        lines = index = None

    return Traceback(filename, lineno, frame.f_code.co_name, lines, index)
Returns a timestamp representing the current time, suitable for XML-RPC
dataset/ETHPy150Open ufora/ufora/packages/python/pyfora/PyforaInspect.py/getframeinfo--crossover with--dataset/ETHPy150Open dgraziotin/dycapo/server/utils.py/now