def _gen_indicator_method(self, name, custom_class, value_count):
        """Dynamically generate custom Indicator methods.

        Args:
            name (str): The name of the method.
            custom_class (object): The class to add.
            value_count (int): The number of value parameters to support.
        """
        method_name = name.replace(' ', '_').lower()

        # Add Method for each Custom Indicator class
        def method_1(value1, xid, **kwargs):  # pylint: disable=W0641
            """Add Custom Indicator data to Batch object"""
            indicator_obj = custom_class(value1, xid, **kwargs)
            return self._indicator(indicator_obj)

        def method_2(value1, value2, xid, **kwargs):  # pylint: disable=W0641
            """Add Custom Indicator data to Batch object"""
            indicator_obj = custom_class(value1, value2, xid, **kwargs)
            return self._indicator(indicator_obj)

        def method_3(value1, value2, value3, xid, **kwargs):  # pylint: disable=W0641
            """Add Custom Indicator data to Batch object"""
            indicator_obj = custom_class(value1, value2, value3, xid, **kwargs)
            return self._indicator(indicator_obj)

        method = locals()['method_{}'.format(value_count)]
        setattr(self, method_name, method)
def _gen_indicator_method ( self , name , custom_class , value_count ) : method_name = name . replace ( ' ' , '_' ) . lower ( ) def method_1 ( value1 , xid , ** kwargs ) : indicator_obj = custom_class ( value1 , xid , ** kwargs ) return self . _indicator ( indicator_obj ) def method_2 ( value1 , value2 , xid , ** kwargs ) : indicator_obj = custom_class ( value1 , value2 , xid , ** kwargs ) return self . _indicator ( indicator_obj ) def method_3 ( value1 , value2 , value3 , xid , ** kwargs ) : indicator_obj = custom_class ( value1 , value2 , value3 , xid , ** kwargs ) return self . _indicator ( indicator_obj ) method = locals ( ) [ 'method_{}' . format ( value_count ) ] setattr ( self , method_name , method )
Dynamically generate custom Indicator methods.

        Args:
            name (str): The name of the method.
            custom_class (object): The class to add.
            value_count (int): The number of value parameters to support.