code: def create(configs):
      
      if not configs:
          raise Error(ANDROID_DEVICE_EMPTY_CONFIG_MSG)
      elif configs == ANDROID_DEVICE_PICK_ALL_TOKEN:
          ads = get_all_instances()
      elif not isinstance(configs, list):
          raise Error(ANDROID_DEVICE_NOT_LIST_CONFIG_MSG)
      elif isinstance(configs[0], dict):
          # Configs is a list of dicts.
          ads = get_instances_with_configs(configs)
      elif isinstance(configs[0], basestring):
          # Configs is a list of strings representing serials.
          ads = get_instances(configs)
      else:
          raise Error('No valid config found in: %s' % configs)
      valid_ad_identifiers = list_adb_devices() + list_adb_devices_by_usb_id()
  
      for ad in ads:
          if ad.serial not in valid_ad_identifiers:
              raise DeviceError(ad, 'Android device is specified in config but'
                                ' is not attached.')
      _start_services_on_ads(ads)
      return ads
docs: Creates AndroidDevice controller objects.
  
      Args:
          configs: A list of dicts, each representing a configuration for an
              Android device.
  
      Returns:
          A list of AndroidDevice objects.