docs: def validate(policy):
      """
      Validates a policy and its parameters and raises an error if invalid
      """
      for param, value in policy.items():
  
          if param not in ACCEPTED_SECURITY_TYPES.keys():
              raise SecurityError('Invalid Security Parameter: {}'.format(param))
  
          if type(value) != ACCEPTED_SECURITY_TYPES[param]:
              raise SecurityError('Invalid Parameter Data Type for {}, '
                                  'Expecting: {} Received: {}'.format(
                                      param, ACCEPTED_SECURITY_TYPES[param],
                                      type(value)))