def METHOD_NAME(comp):
    if comp.id == -1:
        warn(f"Encountered nil compartment on {gid}")
        return
    loc, d = pwlin.closest(*comp.start)
    if d > 0.0001:
        raise AdapterError(f"Couldn't find {comp.start}, on {self._str(gid)}")
    labels[f"comp_{comp.id}"] = str(loc)