code: def cloneaccount(ctx, account_name, account):
      
      from bitsharesbase import transactions, operations
  
      account = Account(account)
      op = {
          "fee": {"amount": 0, "asset_id": "1.3.0"},
          "registrar": account["id"],
          "referrer": account["id"],
          "referrer_percent": 100,
          "name": account_name,
          "owner": account["owner"],
          "active": account["active"],
          "options": account["options"],
          "extensions": {},
          "prefix": ctx.bitshares.rpc.chain_params["prefix"],
      }
      op = operations.Account_create(**op)
      print_tx(ctx.bitshares.finalizeOp(op, account, "active"))
docs: Clone an account
  
          This copies the owner and active permissions as well as the
          options (e.g. votes, memo key)