code: def handle_flagged_args(args, config):
      
      error = None
      os_version = str()
      os_type = str()
      os_category = \
          BuildError(args, msg="Invalid build config", frame=gfi(cf()))
      # we're building for just one, and it should already be in
      # expected_operations...
      for item in expected_operations:
          if item.name == args['os_type']:
              for version in item.versions:
                  os_version = version
                  os_type = item.os_type
                  if item.os_category == 'redhat':
                      os_category = build_redhat
                  elif item.os_category == 'debian':
                      os_category = build_debian
                  else:
                      error = False
                      os_category = os_category.print_msg
                  break
      error = os_category(config, os_version, os_type=os_type) if error \
          else error
docs: handle_flagged_args
  
  This function will execute the appropriate steps for what arguments have been
  given.  This is, essentially, a good "drop in" point for outside code to use
  this module as long as args is a dict within the appropriate format or is an
  empty dictionary.