code: def check_file_type(file):
      file_type = None
      cmd = f"head -n 30 {file}"
      try:
          p = subprocess.Popen(
              cmd,
              shell=True,
              stdout=subprocess.PIPE,
              stderr=subprocess.STDOUT,
          )
          res = [i.strip() for i in p.stdout.readlines()]
      except Exception:
          return file_type
      for i in res:
          try:
              line = i.decode("utf-8")
          except Exception:
              pass
          else:
              if "element face" in line:
                  face_count = int(line.split(" ")[-1])
                  if face_count == 0:
                      file_type = "pcd"
                  else:
                      file_type = "mesh"
                  break
      return file_type
  
imports: import vtk
  import json
  import numpy
  import argparse
  import sys
  import subprocess
  from plyfile import PlyData
label_desc: Use image node_id 3 for calling a global function with example usage: check_file_type(file) and returns: file_type, file_type