def get_source_code(filename, lineno, module_globals):
    """
    :param str filename:
    :param int lineno:
    :param dict[str] module_globals:
    :return: source code of that line
    :rtype: str
    """
    import linecache
    linecache.checkcache(filename)
    source_code = linecache.getline(filename, lineno, module_globals)
    # In case of a multi-line statement, lineno is usually the last line.
    # We are checking for missing open brackets and add earlier code lines.
    while is_source_code_missing_open_brackets(source_code):
        if lineno <= 0:
            break
        lineno -= 1
        source_code = "".join([linecache.getline(filename, lineno, module_globals), source_code])
    return source_code