help please! thank in advance

```
def average(numbers):
total = sum(numbers)
total = float(sum(numbers))
return total/len(numbers)
def get_average(student):
homework = [average(student["homework"])]
quizzes = [average(student["quizzes"])]
tests = [average(student["tests"])]
return (0.1 * homework) + (0.3 * quizzes) + (0.6 * tests)
```

File "python", line 28

SyntaxError: 'return' outside function