code: def _clean_flags(args, caller):
      '''
      Sanitize flags passed into df
      '''
      flags = ''
      if args is None:
          return flags
      allowed = ('a', 'B', 'h', 'H', 'i', 'k', 'l', 'P', 't', 'T', 'x', 'v')
      for flag in args:
          if flag in allowed:
              flags += flag
          else:
              raise CommandExecutionError(
                  'Invalid flag passed to {0}'.format(caller)
              )
      return flagf _clean_flags(args, caller):
      '''
      Sanitize flags passed into df
      '''
      flags = ''
      if args is None:
          return flags
      allowed = ('a', 'B', 'h', 'H', 'i', 'k', 'l', 'P', 't', 'T', 'x', 'v')
      for flag in args:
          if flag in allowed:
              flags += flag
          else:
              raise CommandExecutionError(
                  'Invalid flag passed to {0}'.format(caller)
              )
      return flags
docs: Sanitize flags passed into df