<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def map_agents_for_stmt(self, stmt, do_rename=True):
 """Return a new Statement whose agents have been grounding mapped. Parameters stmt : :py:class:`indra.statements.Statement` The Statement whose agents need mapping. do_rename: Optional[bool] If True, the Agent name is updated based on the mapped grounding. If do_rename is True the priority for setting the name is FamPlex ID, HGNC symbol, then the gene name from Uniprot. Default: True Returns ------- mapped_stmt : :py:class:`indra.statements.Statement` The mapped Statement. """

        mapped_stmt = deepcopy(stmt)
        # Iterate over the agents

        # Update agents directly participating in the statement
        agent_list = mapped_stmt.agent_list()
        for idx, agent in enumerate(agent_list):
            if agent is None:
                continue
            agent_txt = agent.db_refs.get('TEXT')
            if agent_txt is None:
                continue

            new_agent, maps_to_none = self.map_agent(agent, do_rename)

            # Check if a deft model exists for agent text
            if self.use_deft and agent_txt in deft_disambiguators:
                try:
                    run_deft_disambiguation(mapped_stmt, agent_list, idx,
                                            new_agent, agent_txt)
                except Exception as e:
                    logger.error('There was an error during Deft'
                                 ' disambiguation.')
                    logger.error(e)

            if maps_to_none:
                # Skip the entire statement if the agent maps to None in the
                # grounding map
                return None

            # If the old agent had bound conditions, but the new agent does
            # not, copy the bound conditions over
            if new_agent is not None and len(new_agent.bound_conditions) == 0:
                new_agent.bound_conditions = agent.bound_conditions

            agent_list[idx] = new_agent

        mapped_stmt.set_agent_list(agent_list)

        # Update agents in the bound conditions
        for agent in agent_list:
            if agent is not None:
                for bc in agent.bound_conditions:
                    bc.agent, maps_to_none = self.map_agent(bc.agent,
                                                            do_rename)
                    if maps_to_none:
                        # Skip the entire statement if the agent maps to None
                        # in the grounding map
                        return None

        return mapped_stmt