def METHOD_NAME(barcode, pin):
    # Create the authentication document
    authorize_request = etree.Element("AuthorizeRequest")
    user_id = etree.Element("UserID")
    user_id.text = barcode
    password = etree.Element("Password")
    password.text = pin
    authorize_request.append(user_id)
    authorize_request.append(password)
    return etree.tostring(authorize_request, encoding='utf8')