<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_grounding(stmts_in, **kwargs):
 """Map grounding using the GroundingMapper. Parameters stmts_in : list[indra.statements.Statement] A list of statements to map. do_rename : Optional[bool] If True, Agents are renamed based on their mapped grounding. grounding_map : Optional[dict] A user supplied grounding map which maps a string to a dictionary of database IDs (in the format used by Agents' db_refs). use_deft : Optional[bool] If True, Deft will be attempted to be used for acronym disambiguation. Default: True save : Optional[str] The name of a pickle file to save the results (stmts_out) into. Returns ------- stmts_out : list[indra.statements.Statement] A list of mapped statements. """

    from indra.preassembler.grounding_mapper import GroundingMapper
    from indra.preassembler.grounding_mapper import gm as grounding_map
    from indra.preassembler.grounding_mapper import \
        default_agent_map as agent_map
    logger.info('Mapping grounding on %d statements...' % len(stmts_in))
    do_rename = kwargs.get('do_rename')
    gm = kwargs.get('grounding_map', grounding_map)
    if do_rename is None:
        do_rename = True
    gm = GroundingMapper(gm, agent_map, use_deft=kwargs.get('use_deft', True))
    stmts_out = gm.map_agents(stmts_in, do_rename=do_rename)
    dump_pkl = kwargs.get('save')
    if dump_pkl:
        dump_statements(stmts_out, dump_pkl)
    return stmts_out