class_docstr: Geocoder using Photon geocoding service (data based on OpenStreetMap
  and service provided by Komoot on https://photon.komoot.io).
  
  Documentation at:
      https://github.com/komoot/photon
  
  Photon/Komoot geocoder aims to let you `search as you type with
  OpenStreetMap`. No API Key is needed by this platform.
  
  .. versionchanged:: 2.2
      Changed default domain from ``photon.komoot.de``
      to ``photon.komoot.io``.
class_docstr_tok: ["Geocoder","using","Photon","geocoding","service","(","data","based","on","OpenStreetMap","and","service","provided","by","Komoot","on","https",":","\/\/photon.komoot.io",")",".","Documentation","at",":","https",":","\/\/github.com\/komoot\/photon","Photon\/Komoot","geocoder","aims","to","let","you","`","search","as","you","type","with","OpenStreetMap","`",".","No","API","Key","is","needed","by","this","platform",".","..","versionchanged",":",":","2.2","Changed","default","domain","from","``","photon.komoot.de","``","to","``","photon.komoot.io","``","."]
code: def _parse_resource(self, resource):
      # Return location and coordinates tuple from dict.
      name_elements = [
          "name",
          "housenumber",
          "street",
          "postcode",
          "street",
          "city",
          "state",
          "country",
      ]
      name = [
          resource["properties"].get(k)
          for k in name_elements
          if resource["properties"].get(k)
      ]
      location = ", ".join(name)
  
      latitude = resource["geometry"]["coordinates"][1]
      longitude = resource["geometry"]["coordinates"][0]
      if latitude and longitude:
          latitude = float(latitude)
          longitude = float(longitude)
  
      return Location(location, (latitude, longitude), resource)
  
file_path: geopy/geopy/geocoders/photon.py
imports: import collections.abc
  from functools import partial
  from urllib.parse import urlencode
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 5 for calling the Photon obj's underlying member method code with example usage: obj._parse_resource(resource) and returns: Location