def SplitNetworkNameSecurity(network):
  """Splits a network name from it's security type.

  Splits strings of the form NetworkName$NetworkSecurity into a tuple of
  NetworkName, NetworkSecurity. Verifies that security matches one of the
  allowed options in _SECURITY_TYPES; if the security type is missing or is not
  in the allowed types, it is assumed to be OPEN.

  Args:
    network: str, the network name to split

  Returns:
    name: str, the network name.
    security: str, the network security type.
  """
  try:
    name, security = network.split('$')
    security = security.upper()
    if security not in _SECURITY_TYPES:
      security = 'OPEN'
  except __HOLE__:
    name = network
    security = 'OPEN'
  return name, security
dataset/ETHPy150Open google/macops/gmacpyutil/gmacpyutil/wifi_network_order.py/SplitNetworkNameSecurity