def _setup_container(container_name):
    """ Try and find a container in a variety of methods """
    for meth in (database.load_container,
                 load_new_labware,
                 _load_weird_container):
        log.debug(
            f"Trying to load container {container_name} via {meth.__name__}")
        try:
            container = meth(container_name)
            if meth == _load_weird_container:
                container.properties['type'] = container_name
            log.info(f"Loaded {container_name} from {meth.__name__}")
            break
        except (ValueError, KeyError):
            log.info(f"{container_name} not in {meth.__name__}")
    else:
        raise KeyError(f"Unknown labware {container_name}")

    container_x, container_y, container_z = container._coordinates

    # infer z from height
    if container_z == 0 and 'height' in container[0].properties:
        container_z = container[0].properties['height']

    from opentrons.util.vector import Vector
    container._coordinates = Vector(
        container_x,
        container_y,
        container_z)

    return container
Try and find a container in a variety of methods