def get_application(client, name_or_id):
    """Load an application by name or ID."""
    if name_or_id.isdigit():
        return client.get_application(name_or_id)
    applications = client.get_applications({'name': name_or_id})
    if not applications:
        return
    return client.reload(applications[0])