def METHOD_NAME(self, manual_mode=True):
    """
    Descript.: prepare beamline for a new sample,
    """
    logging.getLogger("HWR").info("Preparing beamline for a new sample.")
    time.sleep(1)
    if manual_mode:
        if self.detector_cover_hwobj is not None:
            logging.getLogger("HWR").info("Closing detector shutter...")
            self.detector_cover_hwobj.closeShutter()
        logging.getLogger("HWR").info("Setting diffractometer in Transfer phase...")
        HWR.beamline.diffractometer.set_phase("Transfer", wait=False)
        if (
            HWR.beamline.safety_shutter is not None
            and HWR.beamline.safety_shutter.getShutterState() == "opened"
        ):
            logging.getLogger("HWR").info("Closing safety shutter...")
            HWR.beamline.safety_shutter.closeShutter()
            while HWR.beamline.safety_shutter.getShutterState() == "opened":
                gevent.sleep(0.1)
    if HWR.beamline.detector.distance is not None:
        logging.getLogger("HWR").info("Moving detector to safe area...")
        HWR.beamline.detector.distance.set_value(800, timeout=50)