def METHOD_NAME(self, pathname):
    """Helper method for working with paths that reference something
    inside a disk image"""
    for extension in self.DMG_EXTENSIONS:
        (dmg_path, dmg, dmg_source_path) = pathname.partition(extension + "/")
        if dmg:
            dmg_path += extension
            return dmg_path, dmg, dmg_source_path
    # no disk image in path
    return pathname, "", ""