<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_imports(filename):
 """Get all the imports in a file. Each import is a tuple of: (name, alias, is_from, is_star, source_file) """

    with open(filename, "rb") as f:
        src = f.read()
    finder = ImportFinder()
    finder.visit(ast.parse(src, filename=filename))
    imports = []
    for i in finder.imports:
        name, _, is_from, is_star = i
        imports.append(i + (resolve_import(name, is_from, is_star),))
    return imports