I've modified langgraph_assistant function to take dictionary of values 
    {metadata: Dict[str, str]
    object_definition: str
    import_statements: str
    clarifier_info: Dict[str, str]
    clarifier_questions: Dict[str, list[str]]
    test_scenarios_str: str
    test_scenarios_json: Dict[str, str]
    fmc_code: str
    test_code: str
    pytest_report_json: Dict
    pytest_report_str: str
    fca_remaining_iterations: int
    code_reviewer_suggestions: str
    global_variables_and_custom_objects: str
    dependency_descriptions: Dict[str, str]
    scenario_codes:Dict[str, str]}

    instead of taking a langgraph state.modify the changes required. due to change there is no need of find_langgraph_state_for_step simply pass the dictionary with required step.

    instead of update_langgraph_values_based_on_step modify the dictionary before passing.

    for process_langgraph_state use the completed step instead of langgraph_state["next"] to etermine the loop, since langgraph_state is removed

@dataclass
class AppState:

    repo_url: str = ""
    repo_path: str = ""
    repo_cloned: bool = False
    language: str = None
    file_path: str = None
    file_name: str = None
    packages: Dict[str, Any] = field(default_factory=dict)
    complete_methods: Dict[str, Any] = field(default_factory=dict)
    method_name: str = None
    method_definition: str = None
    objective: str = None
    sample_data: Any = None
    test_cases: List[Any] = field(default_factory=list)
    test_cases_full: List[Any] = field(default_factory=list)
    pytest_codes: str = ""
    pytest_results: Dict[str, Any] = field(default_factory=dict)
    langgraph_states: List[Any] = field(default_factory=list)
    selected_scenarios: List[Any] = field(default_factory=list)
    questions: List[Any] = field(default_factory=list)
    answers: List[Any] = field(default_factory=list)
    messages_history: List[Any] = field(default_factory=list)
    components: List[Any] = field(default_factory=list)

    metadata: Dict[str, str]
    object_definition: str
    import_statements: str
    clarifier_info: Dict[str, str]
    clarifier_questions: Dict[str, list[str]]
    test_scenarios_str: str
    test_scenarios_json: Dict[str, str]
    fmc_code: str
    test_code: str
    pytest_report_json: Dict
    pytest_report_str: str
    fca_remaining_iterations: int
    code_reviewer_suggestions: str
    global_variables_and_custom_objects: str
    dependency_descriptions: Dict[str, str]
    scenario_codes:Dict[str, str]

def process_langgraph_state(app_manager):
    """
    Process the latest state of the LangGraph.

    Args:
        app_manager: Instance of AppManager class
    """
    if not app_manager.langgraph_states:
        logger.warning("No LangGraph states to process.")
        return

    try:
        node, langgraph_state = app_manager.langgraph_states[-1]
        langgraph_values = langgraph_state["values"]

        if len(langgraph_state["next"]) == 0:
            app_manager.pytest_results = langgraph_values["pytest_report_str"]
            app_manager.components = [
                "scenarios_section",
                "code_section",
                "results_section",
            ]

        elif langgraph_state["next"] == "ScenarioGenerator":
            app_manager.questions = [
                f"**Types of dependencies**\n{langgraph_values['dependency_descriptions'].get(app_manager.method_name, '')}\n\n  **Please verify the io types and suggest the changes if necessary:** "
            ]
            app_manager.components = ["verify_io_user_input"]

        elif langgraph_state["next"] == "FMCGenerator":
            app_manager.test_cases_full = langgraph_values["test_scenarios_json"][
                "test_scenarios"
            ]
            app_manager.test_cases = [
                case["scenario_name"] for case in app_manager.test_cases_full
            ]
            app_manager.components = ["scenarios_section"]

        elif langgraph_state["next"] == "CodeRunner":
            app_manager.pytest_codes = langgraph_values["test_code"]
            app_manager.components = ["scenarios_section", "code_section"]

    except KeyError as ke:
        logger.error(
            f"KeyError encountered while processing state {langgraph_state}: {ke}"
        )
        raise
    except Exception as ex:
        logger.error(f"Unexpected error occurred while processing state {ex}")
        raise


def find_langgraph_state_for_step(app_manager, step):
    """Find langgraph state node matching the step target node."""
    target_nodes = {
        "verified_io_types": "DependencyAnalyser",
        "clarification_completed": "Clarifier",
        "code_generation": "ScenarioGenerator",
        "run_pytest_code": "CodeReviewer",
        "self_correction": "CodeRunner",
    }
    target_node = target_nodes.get(step)
    while app_manager.langgraph_states:
        node, state = app_manager.langgraph_states.pop()
        if node == target_node:
            app_manager.langgraph_states.append([node, state])
            return node, state
    return None, None

def update_langgraph_values_based_on_step(step, values, app_manager):
    """Update langgraph values dict based on the current step."""
    if step == "verified_io_types":
        values["user_provided_info"] = app_manager.answers[0]
    elif step == "clarification_completed":
        # Build clarifier_info dict matching questions to answers
        clarifier_questions = values.get("clarifier_questions", {}).get("questions", [])
        values["clarifier_info"] = {
            question: app_manager.answers[i]
            for i, question in enumerate(clarifier_questions)
        }
    elif step == "code_generation":
        filtered_str = filter_selected_scenarios(
            scenarios_string=values.get("test_scenarios_str", ""),
            scenario_names=app_manager.selected_scenarios,
        )
        values["test_scenarios_str"] = filtered_str
        values["test_scenarios_json"] = parse_scenarios(filtered_str)
    elif step == "run_pytest_code":
        values["test_code"] = app_manager.pytest_codes

def generate_results(app_manager, step):
    """
    Generate Response from LangGraph based on the user's input.

    Args:
        app_manager: Instance of AppManager class
        step: Current step in the process

    Returns:
        Updated app_manager instance as dict
    """
    try:
        prev_nodes = {
            "ScenarioGenerator": "DependencyAnalyser",
            "FMCGenerator": "ScenarioGenerator",
            "CodeRunner": "CodeReviewer",
            "CodeReviewer": "TestCodeGenerator",
        }
        if step == "start":
            app_manager.langgraph_states.clear()

            repo_path_abs = os.path.abspath(app_manager.repo_path)
            file_path_abs = os.path.abspath(app_manager.file_path)

            inputs = {
                "object_definition": app_manager.method_definition,
                "metadata": {
                    "language": app_manager.language.lower(),
                    "repo_path": repo_path_abs,
                    "file_path": file_path_abs,
                    "file_name": app_manager.file_name,
                    "object_name": app_manager.method_name,
                    "test_dir": os.path.join(repo_path_abs, "test"),
                },
                "fca_remaining_iterations": FCA_ITERATION,
            }

            langgraph_state = langgraph_assistant(inputs=inputs)
            node = None
        else:
            node, langgraph_state = find_langgraph_state_for_step(app_manager, step)
            update_langgraph_values_based_on_step(step, langgraph_state["values"], app_manager)
            langgraph_state = langgraph_assistant(output=langgraph_state["values"], as_node=node)

        prev_node = prev_nodes.get(langgraph_state.get("next")) if langgraph_state.get("next") else None
        app_manager.langgraph_states.append([prev_node, langgraph_state])

        process_langgraph_state(app_manager)

        return app_manager.__dict__

    except Exception as ex:
        logger.error(f"Error occurred while generating results for step '{step}': {ex}")
        raise