code: def _parse_identifier(identifier):
      id_parts = identifier.split("/")
      if len(id_parts) not in [2, 3]:
          raise ValueError(
              "Invalid identifier found: '%s'" % identifier
          )
  
      return "/".join(id_parts[:2])
  
imports: import logging
  import os
  from collections import defaultdict
  import eta.core.utils
  import eta.core.web
  import pandas
  import fiftyone
  import fiftyone.core.utils
  import fiftyone.utils.data
  from fiftyone.core.expressions import ViewField
  from fiftyone.core.expressions import VALUE
label_desc: Use image node_id 12 for calling a global function with example usage: _parse_identifier(identifier) and returns: str