class_docstr: Geocoder using the Baidu Maps v2 API.
  
  Documentation at:
      http://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-geocoding
  
  .. attention::
      Newly registered API keys will not work with v2 API,
      use :class:`.BaiduV3` instead.
class_docstr_tok: ["Geocoder","using","the","Baidu","Maps","v2","API",".","Documentation","at",":","http",":","\/\/lbsyun.baidu.com\/index.php","?","title=webapi\/guide\/webservice-geocoding","..","attention",":",":","Newly","registered","API","keys","will","not","work","with","v2","API",",","use",":","class",":","`",".BaiduV3","`","instead","."]
docstr: Format the components dict to something Baidu understands.
docstr_tok: ["Format","the","components","dict","to","something","Baidu","understands","."]
code: def _format_components_param(self, components):
      """
      Format the components dict to something Baidu understands.
      """
      return "|".join((":".join(item) for item in components.items()))
  
file_path: geopy/geopy/geocoders/baidu.py
imports: import hashlib
  from functools import partial
  from urllib.parse import quote_plus, urlencode
  from geopy.exc import GeocoderAuthenticationFailure, GeocoderQueryError, GeocoderQuotaExceeded, GeocoderServiceError
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 2 for calling the Baidu obj's underlying member method code with example usage: obj._format_components_param(components) and returns: str