<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def interleave_data(self, prop):
 r""" Retrieves requested property from associated objects, to produce a full Np or Nt length array. Parameters prop : string The property name to be retrieved Returns ------- A full length (Np or Nt) array of requested property values. Notes ----- This makes an effort to maintain the data 'type' when possible; however when data are missing this can be tricky. Data can be missing in two different ways: A set of pores is not assisgned to a geometry or the network contains multiple geometries and data does not exist on all. Float and boolean data is fine, but missing ints are converted to float when nans are inserted. Examples -------- [1 1 1 1] [nan nan nan nan] [nan 1. nan 1. nan 1. nan 1.] [20 1 20 1 20 1 20 1] [False False False False] """

        element = self._parse_element(prop.split('.')[0], single=True)
        N = self.project.network._count(element)

        # Fetch sources list depending on object type?
        proj = self.project
        if self._isa() in ['network', 'geometry']:
            sources = list(proj.geometries().values())
        elif self._isa() in ['phase', 'physics']:
            sources = list(proj.find_physics(phase=self))
        elif self._isa() in ['algorithm', 'base']:
            sources = [self]
        else:
            raise Exception('Unrecognized object type, cannot find dependents')

        # Attempt to fetch the requested array from each object
        arrs = [item.get(prop, None) for item in sources]
        locs = [self._get_indices(element, item.name) for item in sources]
        sizes = [sp.size(a) for a in arrs]
        if sp.all([item is None for item in arrs]):  # prop not found anywhere
            raise KeyError(prop)

        # Check the general type of each array
        atype = []
        for a in arrs:
            if a is not None:
                t = a.dtype.name
                if t.startswith('int') or t.startswith('float'):
                    atype.append('numeric')
                elif t.startswith('bool'):
                    atype.append('boolean')
                else:
                    atype.append('other')
        if not all([item == atype[0] for item in atype]):
            raise Exception('The array types are not compatible')
        else:
            dummy_val = {'numeric': sp.nan, 'boolean': False, 'other': None}

        # Create an empty array of the right type and shape
        for item in arrs:
            if item is not None:
                if len(item.shape) == 1:
                    temp_arr = sp.zeros((N, ), dtype=item.dtype)
                else:
                    temp_arr = sp.zeros((N, item.shape[1]), dtype=item.dtype)
                temp_arr.fill(dummy_val[atype[0]])

        # Convert int arrays to float IF NaNs are expected
        if temp_arr.dtype.name.startswith('int') and \
           (sp.any([i is None for i in arrs]) or sp.sum(sizes) != N):
            temp_arr = temp_arr.astype(float)
            temp_arr.fill(sp.nan)

        # Fill new array with values in the corresponding locations
        for vals, inds in zip(arrs, locs):
            if vals is not None:
                temp_arr[inds] = vals
            else:
                temp_arr[inds] = dummy_val[atype[0]]
        return temp_arr