def get_plan(flatten_dict, recipe_code):
    """
    Return the plan from flatten plan dictionary in function of the
    given code.

    Args:
        recipe_code (str): A recipe code like: bccmea05

    Returns:
        tuple - A tuple with keypath and plan infos if the code is found.
        None - Returns None if the code isn't found.

    """
    for key, value in flatten_dict.items():
        if value["code"] == recipe_code:
            return key, value

    return None