code: def send_calibrate_accelerometer(self, simple=False):
          
  
          calibration_command = self.message_factory.command_long_encode(
              self._handler.target_system, 0,  # target_system, target_component
              mavutil.mavlink.MAV_CMD_PREFLIGHT_CALIBRATION,  # command
              0,  # confirmation
              0,  # param 1, 1: gyro calibration, 3: gyro temperature calibration
              0,  # param 2, 1: magnetometer calibration
              0,  # param 3, 1: ground pressure calibration
              0,  # param 4, 1: radio RC calibration, 2: RC trim calibration
              4 if simple else 1,  # param 5, 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration
              0,  # param 6, 2: airspeed calibration
              0,  # param 7, 1: ESC calibration, 3: barometer temperature calibration
          )
          self.send_mavlink(calibration_command)
docs: Request accelerometer calibration.
  
          :param simple: if True, perform simple accelerometer calibration