code: def create_binary_descriptor(descriptor):
      
  
      func_names = {0: 'copy_latest_a', 1: 'average_a',
                    2: 'copy_all_a', 3: 'sum_a',
                    4: 'copy_count_a', 5: 'trigger_streamer',
                    6: 'call_rpc', 7: 'subtract_afromb'}
  
      func_codes = {y: x for x, y in func_names.items()}
  
      node, inputs, processing = parse_node_descriptor(descriptor, DeviceModel())
  
      func_code = func_codes.get(processing)
      if func_code is None:
          raise ArgumentError("Unknown processing function", function=processing)
  
      stream_a, trigger_a = inputs[0]
      stream_a = stream_a.encode()
  
      if len(inputs) == 2:
          stream_b, trigger_b = inputs[1]
          stream_b = stream_b.encode()
      else:
          stream_b, trigger_b = 0xFFFF, None
  
      if trigger_a is None:
          trigger_a = TrueTrigger()
  
      if trigger_b is None:
          trigger_b = TrueTrigger()
  
      ref_a = 0
      if isinstance(trigger_a, InputTrigger):
          ref_a = trigger_a.reference
  
      ref_b = 0
      if isinstance(trigger_b, InputTrigger):
          ref_b = trigger_b.reference
  
      trigger_a = _create_binary_trigger(trigger_a)
      trigger_b = _create_binary_trigger(trigger_b)
  
      combiner = node.trigger_combiner
  
      bin_desc = struct.pack("<LLHHHBBBB2x", ref_a, ref_b, node.stream.encode(), stream_a, stream_b, func_code, trigger_a, trigger_b, combiner)
      return bin_desc
docs: Convert a string node descriptor into a 20-byte binary descriptor.
  
      This is the inverse operation of parse_binary_descriptor and composing
      the two operations is a noop.
  
      Args:
          descriptor (str): A string node descriptor
  
      Returns:
          bytes: A 20-byte binary node descriptor.