code: def quaternion_about_axis(angle, axis):
      """Return quaternion for rotation about axis.
  
      >>> q = quaternion_about_axis(0.123, [1, 0, 0])
      >>> numpy.allclose(q, [0.99810947, 0.06146124, 0, 0])
      True
  
      """
      q = numpy.array([0.0, axis[0], axis[1], axis[2]])
      qlen = vector_norm(q)
      if qlen > _EPS:
          q *= math.sin(angle / 2.0) / qlen
      q[0] = math.cos(angle / 2.0)
      return q
  
imports: import math
  import numpy
label_desc: Use image node_id 24 for calling a global function with example usage: quaternion_about_axis(angle, axis) and returns: q