<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _is_from_chemical_system(chemical_system, struct):
 """ checks if the structure object is from the given chemical system """

        chemsys = list(set([sp.symbol for sp in struct.composition]))
        if len(chemsys) != len(chemical_system):
            return False
        for el in chemsys:
            if not el in chemical_system:
                return False
        return True