code: def is_VDLRecord_file(path, check=False):
      """Determine whether it is a VDL log file according to the file name.
  
      File name of a VDL log file must contain `vdlrecords`.
  
      Args:
          path: File name to determine.
          check: Check file is valid or not.
  
      Returns:
          True if the file is a VDL log file, otherwise false.
      """
      if "vdlrecords" not in path:
          return False
      if check:
          _reader = RecordReader(filepath=path)
          meta_data = _reader.get_next()
          record = record_pb2.Record()
          record.ParseFromString(meta_data)
          if "meta_data_tag" != record.values[0].tag:
              return False
      return True
  
imports: import collections
  import os
  from functools import partial
  from visualdl.component import components
  from visualdl.io import bfile
  from visualdl.proto import record_pb2
  from visualdl.reader.record_reader import RecordReader
  from visualdl.server.data_manager import default_data_manager
  from visualdl.utils.string_util import decode_tag
  from visualdl.utils.string_util import encode_tag
label_desc: Use image node_id 1 for calling a global function with example usage: is_VDLRecord_file(path, check) and returns: True, False, False