simple python solution
\ndef kdane(lst):\n    n=len(lst)\n    maxx=cur=lst[0]\n    for i in range(1,n):\n        cur=max(cur+lst[i],lst[i])\n        maxx=max(maxx,cur)\n    return max
```\ndef kdane(lst):\n    n=len(lst)\n    maxx=cur=lst[0]\n    for i in range(1,n):\n        cur=max(cur+lst[i],lst[i])\n        maxx=max(maxx,cur)\n    return max(0,maxx)\n    \n\nclass Solution:\n    def kConcatenationMaxSum(self, arr: List[int], k: int) -> int:\n        mod=7+(10**9)\n        n=len(arr)\n        if k==1:\n            return kdane(arr)%mod\n        summ=sum(arr)\n        \n        if summ>0:\n            return ((kdane(arr+arr)%mod)+((k-2)*summ)%mod)%mod\n        else:\n            return (kdane(arr+arr))%mod\n        \n        \n```
[]