def METHOD_NAME():
    module = AnsibleModule(
        argument_spec=dict(
            name=dict(required=True),
            state=dict(choices=['present', 'absent'], default='present'),
            subdomains=dict(default=[], type='list', elements='str'),
            login_name=dict(required=True),
            login_password=dict(required=True, no_log=True),
        ),
        supports_check_mode=True
    )
    domain_name = module.params['name']
    domain_state = module.params['state']
    domain_subdomains = module.params['subdomains']
    session_id, account = webfaction.login(
        module.params['login_name'],
        module.params['login_password']
    )
    domain_list = webfaction.list_domains(session_id)
    domain_map = dict([(i['domain'], i) for i in domain_list])
    existing_domain = domain_map.get(domain_name)
    result = {}
    # Here's where the real stuff happens
    if domain_state == 'present':
        # Does an app with this name already exist?
        if existing_domain:
            if set(existing_domain['subdomains']) >= set(domain_subdomains):
                # If it exists with the right subdomains, we don't change anything.
                module.exit_json(
                    changed=False,
                )
        positional_args = [session_id, domain_name] + domain_subdomains
        if not module.check_mode:
            # If this isn't a dry run, create the app
            # print positional_args
            result.update(
                webfaction.create_domain(
                    *positional_args
                )
            )
    elif domain_state == 'absent':
        # If the app's already not there, nothing changed.
        if not existing_domain:
            module.exit_json(
                changed=False,
            )
        positional_args = [session_id, domain_name] + domain_subdomains
        if not module.check_mode:
            # If this isn't a dry run, delete the app
            result.update(
                webfaction.delete_domain(*positional_args)
            )
    else:
        module.fail_json(msg="Unknown state specified: {0}".format(domain_state))
    module.exit_json(
        changed=True,
        result=result
    )