code: def generate_note_sequence_id(filename, collection_name, source_type):
      """Generates a unique ID for a sequence.
  
      The format is:'/id/<type>/<collection name>/<hash>'.
  
      Args:
        filename: The string path to the source file relative to the root of the
            collection.
        collection_name: The collection from which the file comes.
        source_type: The source type as a string (e.g. "midi" or "abc").
  
      Returns:
        The generated sequence ID as a string.
      """
      filename_fingerprint = hashlib.sha1(filename.encode("utf-8"))
      return "/id/%s/%s/%s" % (
          source_type.lower(),
          collection_name,
          filename_fingerprint.hexdigest(),
      )
  
file_path: magenta/magenta/scripts/convert_dir_to_note_sequences.py
imports: import hashlib
  import os
  from note_seq import abc_parser
  from note_seq import midi_io
  from note_seq import musicxml_reader
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: generate_note_sequence_id(filename, collection_name, source_type) and returns: unknown