def IsLoopbackIP(ip):
  """Boolean check to see if an IP is private or not.

  Args:
    ip: str

  Returns:
    Boolean
  """
  if ip.startswith('127.') or ip == '::1':
    return True
  else:
    return False