code: def validate_pem_format(param_name, param_argument):
      
  
      def _check_pem(arg):
          arg = arg.strip()
          if not arg.startswith('-----BEGIN CERTIFICATE-----') \
                  or not arg.endswith('-----END CERTIFICATE-----'):
              return False
          return True
  
      if isinstance(param_argument, str):
          param_argument = [param_argument]
  
      if not isinstance(param_argument, list) or not all(_check_pem(p) for p in param_argument):
          error_msg = 'unsupported {param} public key / certificate format, required type: PEM'
          raise exceptions.ParamValidationError(error_msg.format(param=param_name))
docs: Validate that an argument is a PEM-formatted public key or certificate
  
      :param param_name: The name of the parameter being validate. Used in any resulting exception messages.
      :type param_name: str | unicode
      :param param_argument: The argument to validate
      :type param_argument: str | unicode
      :return: True if the argument is validate False otherwise
      :rtype: bool