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: pool_size.m
    path of file: ./repos/CS_MoCo_LAB/reconstruction/matlab/CS_LAB_matlab/utils/general/ParforProgress2
    
    the code of the file until where you have to start completion: function [x, active] = pool_size()
%POOL_SIZE - temporary hack to return size of current MATLABPOOL
%
% see:
% http://www.mathworks.com/support/solutions/en/data/1-5UDHQP/index.html?product=DM&solution=1-5UDHQP

    %% get matlabpool size - this should work for ALL matlab versions
    try

    
function [x, active] = pool_size()
%POOL_SIZE - temporary hack to return size of current MATLABPOOL
%
% see:
% http://www.mathworks.com/support/solutions/en/data/1-5UDHQP/index.html?product=DM&solution=1-5UDHQP

    %% get matlabpool size - this should work for ALL matlab versions
    try
        session = com.mathworks.toolbox.distcomp.pmode.SessionFactory.getCurrentSession;

        if ~isempty( session ) && session.isSessionRunning() && session.isPoolManagerSession()
            client = distcomp.getInteractiveObject();
            if strcmp( client.CurrentInteractiveType, 'matlabpool' )
                x = session.getLabs().getNumLabs();
            else
                x = 0;
            end