def parse_standard_location_str(location: str) -> tuple[str, LayerIndex]:
    """
    Our transformer implementation uses location strings like "7/mlp/post_act" or "resid/post_emb"
    to capture both the location type and the layer index (if applicable). This function parses
    those strings, returning the location type and layer index. The location type is specific to our
    transformer implementation: call get_activation_location_type_for_hook_location_type to convert
    it into an ActivationLocationType.
    """
    if location[0].isdigit():
        # Example: 7/mlp/post_act
        return location[location.find("/") + 1 :], int(location.split("/")[0])
    else:
        # Example: resid/post_emb
        return location, None

    Our transformer implementation uses location strings like "7/mlp/post_act" or "resid/post_emb"
    to capture both the location type and the layer index (if applicable). This function parses
    those strings, returning the location type and layer index. The location type is specific to our
    transformer implementation: call get_activation_location_type_for_hook_location_type to convert
    it into an ActivationLocationType.
    
neuron_explainer/models/inference_engine_type_registry.py