code: def _get_price_id_for_upgrade_option(self, upgrade_prices, option, value, public=True):
          
          option_category = {
              'memory': 'ram',
              'cpus': 'guest_core',
              'nic_speed': 'port_speed'
          }
          category_code = option_category.get(option)
          for price in upgrade_prices:
              if price.get('categories') is None or price.get('item') is None:
                  continue
  
              product = price.get('item')
              is_private = (product.get('units') == 'PRIVATE_CORE'
                            or product.get('units') == 'DEDICATED_CORE')
  
              for category in price.get('categories'):
                  if not (category.get('categoryCode') == category_code
                          and str(product.get('capacity')) == str(value)):
                      continue
  
                  if option == 'cpus':
                      # Public upgrade and public guest_core price
                      if public and not is_private:
                          return price.get('id')
                      # Private upgrade and private guest_core price
                      elif not public and is_private:
                          return price.get('id')
                  elif option == 'nic_speed':
                      if 'Public' in product.get('description'):
                          return price.get('id')
                  else:
                      return price.get('id')
docs: Find the price id for the option and value to upgrade. This
  
          :param list upgrade_prices: Contains all the prices related to a VS upgrade
          :param string option: Describes type of parameter to be upgraded
          :param int value: The value of the parameter to be upgraded
          :param bool public: CPU will be in Private/Public Node.