import re


def parse_container_id(container_id: str):
    """ Parse container ID from cgroups directory """
    pattern = ".-"
    if any(c for c in pattern if c in container_id):
        return re.split("[.-]", container_id)[1]
    return container_id