original_docstring: 
      Retrieves the MaxMind geoip data for the given IP addresses.
      possible arguments:
      - ip (Required): Comma separated list. the IPs to retrieve data for.
      - fields: If used, will filter all fields except for the specified ones.
                Use this parameter to specify which fields you would like to get back in the
                response. Fields that are not explicitly named are excluded.
      Args:
          client (Client): QRadar client to perform the API call.
          args (Dict): Demisto args.
  
      Returns:
          CommandResults.
      
docstring: Retrieves the MaxMind geoip data for the given IP addresses.
  possible arguments:
  ip (Required): Comma separated list. the IPs to retrieve data for.
  fields: If used, will filter all fields except for the specified ones.
  Use this parameter to specify which fields you would like to get back in the
  response. Fields that are not explicitly named are excluded.
docstring_tokens: Retrieves the MaxMind geoip data for the given IP addresses . possible arguments : ip ( Required ) : Comma separated list . the IPs to retrieve data for . fields : If used will filter all fields except for the specified ones . Use this parameter to specify which fields you would like to get back in the response . Fields that are not explicitly named are excluded .
code: def qradar_geolocations_for_ip_command(client: Client, args: Dict) -> CommandResults:
      """
      Retrieves the MaxMind geoip data for the given IP addresses.
      possible arguments:
      - ip (Required): Comma separated list. the IPs to retrieve data for.
      - fields: If used, will filter all fields except for the specified ones.
                Use this parameter to specify which fields you would like to get back in the
                response. Fields that are not explicitly named are excluded.
      Args:
          client (Client): QRadar client to perform the API call.
          args (Dict): Demisto args.
  
      Returns:
          CommandResults.
      """
      ips = argToList(args.get('ip'))
      filter_ = f'''ip_address IN ({','.join(map(lambda ip: f'"{str(ip)}"', ips))})'''
      fields = args.get('fields')
  
      response = client.geolocations_for_ip(filter_, fields)
      outputs = []
      for output in response:
          city_values = flatten_nested_geolocation_values(output, 'city', ['name'])
          continent_values = flatten_nested_geolocation_values(output, 'continent', ['name'])
          location_values = flatten_nested_geolocation_values(output, 'location',
                                                              ['accuracy_radius', 'average_income', 'latitude',
                                                               'longitude', 'metro_code', 'population_density',
                                                               'timezone'])
          physical_country_values = flatten_nested_geolocation_values(output, 'physical_country', ['iso_code', 'name'])
          registered_country_values = flatten_nested_geolocation_values(output, 'registered_country',
                                                                        ['iso_code', 'name'])
          represented_country_values = flatten_nested_geolocation_values(output, 'represented_country',
                                                                         ['iso_code', 'name', 'confidence'])
          subdivision_values = flatten_nested_geolocation_values(output, 'subdivision',
                                                                 ['name', 'iso_code', 'confidence'])
          non_nested_values = {
              'IPAddress': output.get('ip_address'),
              'Traits': output.get('traits'),
              'Coordinates': output.get('geo_json', dict()).get('coordinates'),
              'PostalCode': output.get('postal', dict()).get('postal_code'),
              'PostalCodeConfidence': output.get('postal', dict()).get('confidence')
          }
          final_output = dict(city_values, **continent_values, **location_values, **physical_country_values,
                              **registered_country_values, **represented_country_values, **subdivision_values,
                              **non_nested_values)
          outputs.append(final_output)
  
      final_outputs = sanitize_outputs(outputs)
  
      return CommandResults(
          readable_output=tableToMarkdown('Geolocation For IP', final_outputs),
          outputs_prefix='QRadar.GeoForIP',
          outputs_key_field='IPAddress',
          outputs=final_outputs,
          raw_response=response
      )
code_tokens: def qradar_geolocations_for_ip_command ( client : Client , args : Dict ) -> CommandResults : ips = argToList ( args . get ( 'ip' ) ) filter_ = f'''ip_address IN ({','.join(map(lambda ip: f'"{str(ip)}"', ips))})''' fields = args . get ( 'fields' ) response = client . geolocations_for_ip ( filter_ , fields ) outputs = [ ] for output in response : city_values = flatten_nested_geolocation_values ( output , 'city' , [ 'name' ] ) continent_values = flatten_nested_geolocation_values ( output , 'continent' , [ 'name' ] ) location_values = flatten_nested_geolocation_values ( output , 'location' , [ 'accuracy_radius' , 'average_income' , 'latitude' , 'longitude' , 'metro_code' , 'population_density' , 'timezone' ] ) physical_country_values = flatten_nested_geolocation_values ( output , 'physical_country' , [ 'iso_code' , 'name' ] ) registered_country_values = flatten_nested_geolocation_values ( output , 'registered_country' , [ 'iso_code' , 'name' ] ) represented_country_values = flatten_nested_geolocation_values ( output , 'represented_country' , [ 'iso_code' , 'name' , 'confidence' ] ) subdivision_values = flatten_nested_geolocation_values ( output , 'subdivision' , [ 'name' , 'iso_code' , 'confidence' ] ) non_nested_values = { 'IPAddress' : output . get ( 'ip_address' ) , 'Traits' : output . get ( 'traits' ) , 'Coordinates' : output . get ( 'geo_json' , dict ( ) ) . get ( 'coordinates' ) , 'PostalCode' : output . get ( 'postal' , dict ( ) ) . get ( 'postal_code' ) , 'PostalCodeConfidence' : output . get ( 'postal' , dict ( ) ) . get ( 'confidence' ) } final_output = dict ( city_values , ** continent_values , ** location_values , ** physical_country_values , ** registered_country_values , ** represented_country_values , ** subdivision_values , ** non_nested_values ) outputs . append ( final_output ) final_outputs = sanitize_outputs ( outputs ) return CommandResults ( readable_output = tableToMarkdown ( 'Geolocation For IP' , final_outputs ) , outputs_prefix = 'QRadar.GeoForIP' , outputs_key_field = 'IPAddress' , outputs = final_outputs , raw_response = response )
short_docstring: Retrieves the MaxMind geoip data for the given IP addresses.
short_docstring_tokens: Retrieves the MaxMind geoip data for the given IP addresses .
comment: """
      Retrieves the MaxMind geoip data for the given IP addresses.
      possible arguments:
      - ip (Required): Comma separated list. the IPs to retrieve data for.
      - fields: If used, will filter all fields except for the specified ones.
                Use this parameter to specify which fields you would like to get back in the
                response. Fields that are not explicitly named are excluded.
      Args:
          client (Client): QRadar client to perform the API call.
          args (Dict): Demisto args.
  
      Returns:
          CommandResults.
      """