code: def sanitise_capabilities(capabilities):
      
      for c in REQUIRED_CAPABILITIES:
          capabilities[c] = options[c]
  
      for c in PROTECTED_CAPABILITIES:
          if c in capabilities:
              del capabilities['client_secret']
  
      return capabilities
docs: Makes sure dictionary of capabilities includes required options, and does not include protected ones.
      :param capabilities:
      :return: dict