def detect_extracellular_compartment(model):
extracellular_key = Counter()<EOL>for reaction in model.reactions:<EOL><INDENT>equation = reaction.equation<EOL>if equation is None:<EOL><INDENT>continue<EOL><DEDENT>if len(equation.compounds) == <NUM_LIT:1>:<EOL><INDENT>compound, _ = equation.compounds[<NUM_LIT:0>]<EOL>compartment = compound.compartment<EOL>extracellular_key[compartment] += <NUM_LIT:1><EOL><DEDENT><DEDENT>if len(extracellular_key) == <NUM_LIT:0>:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>best_key, _ = extracellular_key.most_common(<NUM_LIT:1>)[<NUM_LIT:0>]<EOL><DEDENT>logger.info('<STR_LIT>'.format(best_key))<EOL>return best_key<EOL>
Detect the identifier for equations with extracellular compartments.

    Args:
        model: :class:`NativeModel`.