code: def fast_home(self, axis, safety_margin):
          ''' home after a controlled motor stall
  
          Given a known distance we have just stalled along an axis, move
          that distance away from the homing switch. Then finish with home.
          '''
          # move some mm distance away from the target axes endstop switch(es)
          destination = {
              ax: self.homed_position.get(ax) - abs(safety_margin)
              for ax in axis.upper()
          }
  
          # there is a chance the axis will hit it's home switch too soon
          # if this happens, catch the error and continue with homing afterwards
          try:
              self.move(destination)
          except SmoothieError:
              pass
  
          # then home once we're closer to the endstop(s)
          disabled = ''.join([ax for ax in AXES if ax not in axis.upper()])
          return self.home(axis=axis, disabled=disabledf fast_home(self, axis, safety_margin):
          ''' home after a controlled motor stall
  
          Given a known distance we have just stalled along an axis, move
          that distance away from the homing switch. Then finish with home.
          '''
          # move some mm distance away from the target axes endstop switch(es)
          destination = {
              ax: self.homed_position.get(ax) - abs(safety_margin)
              for ax in axis.upper()
          }
  
          # there is a chance the axis will hit it's home switch too soon
          # if this happens, catch the error and continue with homing afterwards
          try:
              self.move(destination)
          except SmoothieError:
              pass
  
          # then home once we're closer to the endstop(s)
          disabled = ''.join([ax for ax in AXES if ax not in axis.upper()])
          return self.home(axis=axis, disabled=disabled)
docs: home after a controlled motor stall
  
          Given a known distance we have just stalled along an axis, move
          that distance away from the homing switch. Then finish with home.