code: def beat2tick(
      beat,
      ticks_per_beat=DEFAULT_TICKS_PER_BEAT,
      time_signature=DEFAULT_TIME_SIGNATURE,
  ):
      """
      Convert beats to ticks.
  
      Returns ticks for a chosen MIDI file time resolution (ticks/pulses per
      quarter note, also called PPQN) and time signature.
  
      """
      return int(round(beat * 4.0 * ticks_per_beat / time_signature[1]))
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  import mido
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: beat2tick(beat, ticks_per_beat, time_signature) and returns: int