code: def places_photo(client, photo_reference, max_width=None, max_height=None):
      
  
      if not (max_width or max_height):
          raise ValueError("a max_width or max_height arg is required")
  
      params = {"photoreference": photo_reference}
  
      if max_width:
          params["maxwidth"] = max_width
      if max_height:
          params["maxheight"] = max_height
  
      # "extract_body" and "stream" args here are used to return an iterable
      # response containing the image file data, rather than converting from
      # json.
      response = client._request("/maps/api/place/photo", params,
                             extract_body=lambda response: response,
                             requests_kwargs={"stream": True})
      return response.iter_content()
docs: Downloads a photo from the Places API.
  
      :param photo_reference: A string identifier that uniquely identifies a
          photo, as provided by either a Places search or Places detail request.
      :type photo_reference: string
  
      :param max_width: Specifies the maximum desired width, in pixels.
      :type max_width: int
  
      :param max_height: Specifies the maximum desired height, in pixels.
      :type max_height: int
  
      :rtype: iterator containing the raw image data, which typically can be
          used to save an image file locally. For example:
  
          ```
          f = open(local_filename, 'wb')
          for chunk in client.places_photo(photo_reference, max_width=100):
              if chunk:
                  f.write(chunk)
          f.close()
          ```