code: def label_from_bin(buf):
      
  
      mpls_label = type_desc.Int3.to_user(six.binary_type(buf))
      return mpls_label >> 4, mpls_label & 1
docs: Converts binary representation label to integer.
  
      :param buf: Binary representation of label.
      :return: MPLS Label and BoS bit.