def METHOD_NAME(logger, subprocess_arr, cwd=None):
    logger.info(f"running subprocess {subprocess_arr[0]}")
    if cwd:
        p = subprocess.run(subprocess_arr,cwd=cwd,capture_output=True, text=True, timeout=None)
    else:
        p = subprocess.run(subprocess_arr,capture_output=True, text=True, timeout=None)
    logger.info('subprocess completed... ')
    output = p.stdout
    try:
        required_output = json.loads(output)
    except json.decoder.JSONDecodeError as e:
        session.logger.error(f"Could not parse required output! \n output: {output} \n Error: {e}")
        raise e
    return required_output