<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_chebi_name_from_id(chebi_id, offline=False):
 """Return a ChEBI name corresponding to the given ChEBI ID. Parameters chebi_id : str The ChEBI ID whose name is to be returned. offline : Optional[bool] Choose whether to allow an online lookup if the local lookup fails. If True, the online lookup is not attempted. Default: False. Returns ------- chebi_name : str The name corresponding to the given ChEBI ID. If the lookup fails, None is returned. """

    chebi_name = chebi_id_to_name.get(chebi_id)
    if chebi_name is None and not offline:
        chebi_name = get_chebi_name_from_id_web(chebi_id)
    return chebi_name