def METHOD_NAME(self, name: str) -> Optional[LayerVersion]:
    """
    Returns the layer with given name or logical id.
    If it is in a nested stack, name can be prefixed with stack path to avoid ambiguity
    Parameters
    ----------
    name: name or logical id of the layer.
    Returns
    -------
    LayerVersion object of one layer.
    """
    if not name:
        raise ValueError("Layer name is required")
    for layer in self._layers:
        if name in (layer.full_path, layer.layer_id, layer.name):
            return layer
    return None