code: def get_viewset_transition_action_mixin(model, **kwargs):
      '''
      Find all transitions defined on `model`, then create a corresponding
      viewset action method for each and apply it to `Mixin`. Finally, return
      `Mixin`
      '''
      instance = model()
  
      class Mixin(object):
          save_after_transition = True
  
      transitions = instance.get_all_status_transitions()
      transition_names = set(x.name for x in transitions)
      for transition_name in transition_names:
          setattr(
              Mixin,
              transition_name,
              get_transition_viewset_method(transition_name, **kwargs)
          )
  
      return Mixif get_viewset_transition_action_mixin(model, **kwargs):
      '''
      Find all transitions defined on `model`, then create a corresponding
      viewset action method for each and apply it to `Mixin`. Finally, return
      `Mixin`
      '''
      instance = model()
  
      class Mixin(object):
          save_after_transition = True
  
      transitions = instance.get_all_status_transitions()
      transition_names = set(x.name for x in transitions)
      for transition_name in transition_names:
          setattr(
              Mixin,
              transition_name,
              get_transition_viewset_method(transition_name, **kwargs)
          )
  
      return Mixin
docs: Find all transitions defined on `model`, then create a corresponding
      viewset action method for each and apply it to `Mixin`. Finally, return
      `Mixin`