It is each student's responsibility to ensure that when they include (directly or indirectly) the work of others, that this contribution is fully acknowledged and documented.
You are encouraged to ask your mentor/tutor for advice about your project work, but note that your project code should not include any code written by others, unless it is explicitly credited to them with a comment above. Any code provided by your mentor/tutor would not contribute to your assessment. Failure to attribute code that isn't yours to other parties will be considered plagiarism. This is a serious offence and will result in a failing grade.