code: def is_ecma_regex(regex):
      """Check if given regex is of type ECMA 262 or not.
  
      :rtype: bool
  
      """
      parts = regex.split("/")
  
      if len(parts) == 1:
          return False
  
      if len(parts) < 3:
          raise ValueError(
              "Given regex isn't ECMA regex nor Python regex."
          )
      parts.pop()
      parts.append("")
  
      raw_regex = "/".join(parts)
      if raw_regex.startswith("/") and raw_regex.endswith("/"):
          return True
      return False
  
file_path: clearml/clearml/backend_api/session/jsonmodels/utilities.py
imports: from __future__ import absolute_import
  import six
  import re
  from collections import namedtuple
label_desc: Use image node_id 6 for calling a global function with example usage: is_ecma_regex(regex) and returns: False, False, True