def integrate_mtz_to_unit_cell(integrate_mtz):
    """Generate a cctbx unit_cell from an integrate_mtz file."""
    from iotbx import mtz
    m = mtz.object(integrate_mtz)
    for c in m.crystals():
        return c.unit_cell()
    raise RuntimeError('unit cell not found')
