import sys
import threading
import multiprocessing
import time
import numpy

import hark

class TestNode(hark.node.PythonNode):
    def __init__(self):
        super().__init__('INPUT', 'OUTPUT')

    def forward(self, **kwargs):
        print("######")
        print(kwargs)
        if isinstance(kwargs['INPUT'], hark.harklib.Source):
            print("Type is Source")
        else:
            print("Type is not Source")
        if isinstance(kwargs['INPUT'], list):
            print("Type is list")
            for src in kwargs['INPUT']:
                if isinstance(src, hark.harklib.Source):
                    print("Type is harklib.Source in list")
                else:
                    print("Type is not harklib.Source in list")
        #return {'OUTPUT': kwargs('INPUT')}
        return {'OUTPUT': numpy.array([1.0, 1.0, 1.0], dtype=numpy.float32)}
        #return {'OUTPUT': numpy.array([[[[0.0, 1.0], [2.0, 3.0]], [[4.0, 5.0], [6.0, 7.0]]], [[[8.0, 9.0], [10.0, 11.0]], [[12.0, 13.0], [14.0, 15.0]]]], dtype=numpy.complex64)}


