def has_local_name(agent):
    """Loops through all the agent names and returns True if any of them have
    a source of `local`, `ingest`, `nad`, or `naf`"""
    for name in agent.names:
        if name.source in ['local', 'ingest', 'nad', 'naf']:
            return True
    return False