def get_target_data(self, exp_uid, index):
        """
        Get an individual targets metadata given that targets index.

        Inputs: 
            (string) exp_uid, index
        Outputs:
            (dict) target_data

        Usage: ::\n
        didSucceed = targetmapper.init_empty_target_mapping(exp_uid, n)
        """
        target_data,didSucceed,message = db.getDocsByPattern(self.database_id, self.bucket_id, {'exp_uid': exp_uid, 'targetless': False})
        # Pass back message if getDocsByPattern fails
        if not didSucceed:
            raise DatabaseException("Failed to get_target_data: %s"%(message))
        # This line is key. If no doc exists with the specified exp_uid and targetless = True, then targetless = False
        if not target_data:
            return {'target_id':index,
                    'primary_description':index,
                    'primary_type':'text',
                    'alt_description':index,
                    'alt_type':'text'}
        # Get an individual target form the DB given exp_uid and index
        target_data,didSucceed,message = db.getDocsByPattern(self.database_id, self.bucket_id, {'exp_uid': exp_uid, 'index':index})
        # If doc cannot be retreived, throw an error
        if not didSucceed:
            raise DatabaseException("Failed to get_target_data: %s"%(message))
        # Pop target_dict out of list and return
        target_data_dict = target_data.pop(0)
        return target_data_dict
dataset/ETHPy150Open nextml/NEXT/next/api/targetmapper.py/TargetMapper.get_target_data/original