title: How to create a code object in python?
body: <p>I'd like to create a new code object with the function types.CodeType() .<br>
  There is almost no documentation about this and the existing one says "not for faint of heart"<br>
  Tell me what i need and give me some information about each argument passed to types.CodeType ,<br>
  possibly posting an example.</p>
  
  <p><strong>Note</strong>:<br>
  In normal use cases you will just need the builtin function compile()<br>
  You should use types.CodeType() only if you want to create new instructions that couldn't be obtained writing normal source code and that require direct access to bytecode.</p>