<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_admins_from_django(homedir):
 return ["root@localhost"] """ Get admin's emails from django settings """

    path = homedir + "/settings/basic.py"
    if not os.path.exists(path):
        path = homedir + "/settings.py"

    if not os.path.exists(path):
        return

    mod = compiler.parseFile(path)
    for node in mod.node.nodes:
        try:
            if node.asList()[0].name == "ADMINS":
                # print dir(node.asList()[1].nodes)
                # print node.asList()[1].nodes
                return [it.nodes[1].value for it in node.asList()[1].asList()]
        except:
            pass