def process_usufy(self, data):
        """
        Method to process and extract the entities of a usufy

        Args:
        -----
            data: The information from which the info will be extracted. 
            
        Return:
        -------
            A list of the entities found.
        """
        mode = "usufy"
        info = []

        try:
            # v2
            verifier = self.modes.get(mode, {}).get("extra_fields", {})
            for field in verifier.keys():
                regexp = verifier[field]
                values = re.findall(regexp, data)

                for val in values:
                    aux = {}
                    aux["type"] = field
                    aux["value"] = val
                    aux["attributes"] = []
                    if aux not in info:
                        info.append(aux)
        except AttributeError as e:
            # Legacy
            for field in self.fieldsRegExp[mode].keys():
                # Recovering the RegularExpression
                try:
                    # Using the old approach of "Start" + "End"
                    regexp = self.fieldsRegExp[mode][field]["start"]+"([^\)]+)"+self.fieldsRegExp[mode][field]["end"]

                    tmp = re.findall(regexp, data)

                    # Now we are performing an operation just in case the "end" tag is found  in the results, which would mean that the tag selected matches something longer in the data.
                    values = []
                    for t in tmp:
                        if self.fieldsRegExp[mode][field]["end"] in t:

                            values.append(t.split(self.fieldsRegExp[mode][field]["end"])[0])
                        else:
                            values.append(t)
                except:
                    # Using the compact approach if start and end tags do not exist.
                    regexp = self.fieldsRegExp[mode][field]

                    values = re.findall(regexp, data)

                for val in values:
                    aux = {}
                    aux["type"] = field
                    aux["value"] = val
                    aux["attributes"] = []
                    if aux not in info:
                        info.append(aux)
        return info
def process_usufy ( self , data ) : mode = "usufy" info = [ ] try : verifier = self . modes . get ( mode , { } ) . get ( "extra_fields" , { } ) for field in verifier . keys ( ) : regexp = verifier [ field ] values = re . findall ( regexp , data ) for val in values : aux = { } aux [ "type" ] = field aux [ "value" ] = val aux [ "attributes" ] = [ ] if aux not in info : info . append ( aux ) except AttributeError as e : for field in self . fieldsRegExp [ mode ] . keys ( ) : try : regexp = self . fieldsRegExp [ mode ] [ field ] [ "start" ] + "([^\)]+)" + self . fieldsRegExp [ mode ] [ field ] [ "end" ] tmp = re . findall ( regexp , data ) values = [ ] for t in tmp : if self . fieldsRegExp [ mode ] [ field ] [ "end" ] in t : values . append ( t . split ( self . fieldsRegExp [ mode ] [ field ] [ "end" ] ) [ 0 ] ) else : values . append ( t ) except : regexp = self . fieldsRegExp [ mode ] [ field ] values = re . findall ( regexp , data ) for val in values : aux = { } aux [ "type" ] = field aux [ "value" ] = val aux [ "attributes" ] = [ ] if aux not in info : info . append ( aux ) return info
Method to process and extract the entities of a usufy

        Args:
        -----
            data: The information from which the info will be extracted. 
            
        Return:
        -------
            A list of the entities found.