code: def do_media(self, args):
          
          func = getattr(args, 'func', None)
          if func is not None:
              # Call whatever subcommand function was selected
              func(self, args)
          else:
              # No subcommand was provided, so call help
              self.do_help('media')
docs: Media management command demonstrates multiple layers of sub-commands being handled by AutoCompleter