Hi @All, I have created a block for a procedure using "procedures_defreturn" and changed the IDKey to "custom_procedures_defreturn", and used the same code from the procedure file.
My problem is... 1.) When I join/attached with the next block (two blocks) the output of the next block is generating twice(Duplication).
If there is only one block and it is not connected the code is generating only once.
If two blocks are connected then the second block output is generating twice.
if there the three-block attached then the output is generating x2. I have attached small videos Please look at once... Filename: (
screencast-nimbus-capture-2021.05.14-16_08_36.webm )
I have changed some code from the "custom_procedures_defreturn" in the generated stub block...
// Blockly.Python.definitions_["%" + d] = b;
return b
// Blockly.Python.definitions_["%" + d] = b; I have commented this line because I want to generate function code inside class.

In the screenshot you can see... I have used two functions called unnamed and unnamed2. But in the generated code it is showing duplicate for unnamed2. how to fixed it?
2.)
Also if I right-click on the custom_procedures_defreturn block and create "function call" using the "Create 'Function' name then also one more block is creating automatically." which is captured in the small videos at: 0.35 secs
Please help me out to fix the issue...
Your help will be highly appreciated.