docs: def _get_vcap_services(vcap_services=None):
      """Retrieves the VCAP Services information from the `ConfigParams.VCAP_SERVICES` field in the config object. If
      `vcap_services` is not specified, it takes the information from VCAP_SERVICES environment variable.
  
      Args:
          vcap_services (str): Try to parse as a JSON string, otherwise, try open it as a file.
          vcap_services (dict): Return the dict as is.
  
      Returns:
          dict: A dict representation of the VCAP Services information.
  
      Raises:
          ValueError:
              * if `vcap_services` nor VCAP_SERVICES environment variable are specified.
              * cannot parse `vcap_services` as a JSON string nor as a filename.
      """
      vcap_services = vcap_services or os.environ.get('VCAP_SERVICES')
      if not vcap_services:
          raise ValueError(
              "VCAP_SERVICES information must be supplied as a parameter or as environment variable 'VCAP_SERVICES'")
      # If it was passed to config as a dict, simply return it
      if isinstance(vcap_services, dict):
          return vcap_services
      try:
          # Otherwise, if it's a string, try to load it as json
          vcap_services = json.loads(vcap_services)
      except json.JSONDecodeError:
          # If that doesn't work, attempt to open it as a file path to the json config.
          try:
              with open(vcap_services) as vcap_json_data:
                  vcap_services = json.load(vcap_json_data)
          except:
              raise ValueError("VCAP_SERVICES information is not JSON or a file containing JSON:", vcap_services)
      return vcap_services