def take_exposures(self, filename=None):
        try:
            exposure = next(self.exposure_iterator)
            # One start_time for this round of exposures
            start_time = current_time().isot
            fn = start_time

            if filename is not None:
                self._orig_fn = filename
                path = filename.split('/')
                self._images_dir = '/'.join(path[:-1])
                fn = path[-1]
            else:
                fn = '{:03.0f}_{:03.0f}.cr2'.format(self.visit_num, self.exp_num)

            img_files = []

            # Take a picture with each camera
            for cam_name, cam in self.cameras.items():
                self.logger.debug("Exposing for camera: {}".format(cam_name))
                # Start exposure

                cam_fn = '{}/{}_{}'.format(self._images_dir, cam.uid, fn)

                self.logger.debug("Filename for camera: {}".format(cam_fn))
                img_file = cam.take_exposure(seconds=exposure.exptime, filename=cam_fn)
                self._is_exposing = True

                obs_info = {
                    'camera_id': cam.uid,
                    'img_file': img_file,
                    'filter': exposure.filter_type,
                    'exptime': exposure.exptime,
                    'start_time': start_time,
                    'guide_image': cam.is_guide,
                    'primary': cam.is_primary,
                    'visit_num': self.visit_num,
                    'exp_num': self.exp_num,
                    'exp_total': len(self.exposures),
                }
                self.logger.debug("{}".format(obs_info))
                exposure.images[cam_name] = obs_info
                img_files.append(img_file)

        except error.InvalidCommand as e:
            self.logger.warning("{} is already running a command.".format(cam.name))
            self._is_exposing = False
        except Exception as e:
            self.logger.warning("Can't take exposure from Observation: {}".format(e))
            self._is_exposing = False
        finally:
            return exposure.images
check dependency licenses
dataset/ETHPy150Open panoptes/POCS/panoptes/scheduler/observation.py/Observation.take_exposures--crossover with--dataset/ETHPy150Open zalando/python-clickclick/setup.py/check_deps